• 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.

Create a Tab to NavBar using product file

VnSlo

New Member
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:
        <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_my', 'url' => 'my.php', 'newWindow' => 0 );

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

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

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top