Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:
//To Add Banner
class rootnav extends Control {
function rootnav(&$Context) {
$this->Name = 'rootnav';
$this->Control($Context);
}
function Render() {
$this->CallDelegate('PreRender');
echo "...banner html...";
$this->CallDelegate('PostRender');
}
}
if (!in_array($Context->SelfUrl, array("people.php"))) {
$rootnav = $Context->ObjectFactory->CreateControl($Context, 'rootnav');
$Page->AddRenderControl($rootnav, $Configuration['CONTROL_POSITION_HEAD'] + 1);
}
//To Modify 'Menu' class
if (!in_array($Context->SelfUrl, array("people.php"))) {
class Menu_rev extends Menu {
function Render() {
ksort($this->Tabs);
$this->CallDelegate('PreRender');
include(ThemeFilePath($this->Context->Configuration, '../extensions/_extensiondirectory_/menu.php')); //Revised menu.php will be called for Rendering
$this->CallDelegate('PostRender');
}
}
$Menu_rev = $Context->ObjectFactory->CreateControl($Context, 'Menu_rev'); //create an instance of Menu_rev(ised)
$Menu =& $Menu_rev;
//I had to reload the Tabs, so the following code is copied from the appropriate section off 'appg/init_vanilla.php'
// Cleaner suggestions welcome!
// BUILD THE MAIN MENU
$Menu_rev->AddTab($Context->GetDefinition('Discussions'), 'discussions', GetUrl($Configuration, './'), '', $Configuration['TAB_POSITION_DISCUSSIONS']);
...
$Menu_rev->AddTab($Context->GetDefinition('Account'), 'account', GetUrl($Configuration, 'account.php'), '', $Configuration['TAB_POSITION_ACCOUNT']);
}
}
1 to 11 of 11