Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:<?php
/*
Extension Name: Custom Panel Objects
Extension Url: n/a
Description: n/a
Version: 0.1
Author: Timothy Walters Kleinert
Author Url: n/a
*/
// I'm assuming BlogThis uses "extension.php?PostBackAction=BlogThis".
// If I'm wrong, just change the SelfUrl & PostBackAction to the appropriate values.
if ($Context->SelfUrl = 'extension.php' && ForceIncomingString('PostBackAction', '') == 'BlogThis') {
// Here's where you enter the content you want to render.
$EchoContent1 = '';
// This changes the order the object is rendered in relation to other Panel objects.
$ObjectPosition1 = 0;
$CustomObject1 = $Context->ObjectFactory->NewContextObject($Context, 'CustomPanelContent ', $EchoContent1);
$Page->AddRenderControl($CustomObject2, $Configuration['CONTROL_POSITION_PANEL'] + $ObjectPosition1);
// You can create more than one object by replicating the the above code.
// Just be sure to always give the variables different names.
// Note, if all your objects are going to be in a line, you can just string them together in one $EchoContent.
// You can use the code below if you remove the comment markers /* */
/*
$EchoContent2 = '';
$ObjectPosition2 = 0;
$CustomObject2 = $Context->ObjectFactory->NewContextObject($Context, 'CustomPanelContent ', $EchoContent2);
$Page->AddRenderControl($CustomObject2, $Configuration['CONTROL_POSITION_PANEL'] + $ObjectPosition2);
$EchoContent3 = '';
$ObjectPosition3 = 0;
$CustomObject3 = $Context->ObjectFactory->NewContextObject($Context, 'CustomPanelContent ', $EchoContent3);
$Page->AddRenderControl($CustomObject3, $Configuration['CONTROL_POSITION_PANEL'] + $ObjectPosition3);
*/
}
class CustomPanelContent extends Control {
var $Context;
var $EchoContent;
function CustomPanelContent(&$Context, $EchoContent) {
$this->Context = $Context;
$this->$Content = $EchoContent;
}
function Render() {
echo $this->EchoContent;
}
}
?>
1 to 2 of 2