• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

vB5: Create a Tab to NavBar using product file

Admin

Well-Known Member
Staff member
Administrator
Even if vB5 utilizes a powerful Navigation Manager, it lacks the automation procedure for adding a Tab using a product file like version 4.2. In this tutorial I'll try to show you a way to add a Tab in the Nav Bar.

There are only 2 steps to do it:

1.- Adding the Tab (CODES section)

<code version="1.0.0">
<installcode><![CDATA[
$assertor = vB::getDbAssertor();
$navbar = $assertor->getRow('site',array('siteid' => 1));
$array = unserialize($navbar['headernavbar']);
$newarray = array();
foreach($array as $key => $value){
$newarray[] = $value;
}

$newarray[] = array ('title' => 'navbar_mytest', 'url' => 'mytest.php', 'newWindow' => 0 );

$assertor->update('site', array(
'headernavbar' => serialize($newarray)
),
array('siteid' => 1)
);
]]></installcode>
<uninstallcode />
</code>
2.- Assign the Phrase (GLOBAL section)

<phrase name="navbar_mytest" date="1350240918" username="vb5admin" version="1.0.0"><![CDATA[My Test]]></phrase>
Hope that this short code will helps you in case that you want to move your mods to vB5 Connect.

Christos Teriakis
 

Facebook Comments

New posts New threads New resources

Back
Top