tutorialtastic

FicHive: Adding Custom Navigation

Adding custom navigation to a big script can be a pain, especially when the script is in-depth and there's important things missing like a "home" link. This tutorial covers adding custom navigation to FicHive.

First, open "index.php" in the main directory and find the following:

// ##### MAKE NAVIGATION ##### //

foreach( $lang['sys']['nav'] as $key=>$is ) {
$key == "cpanel" && $user['gid'] == 4 ?
$ad = " (<a href='{$conf['url']}index.php?go={$lang['sys']['nav']['apanel']}'>{$lang['sys']['nav']['apanel']}</a>)" :
$ad = "";

if( $key != "apanel" ) $nav[] = "<a href='{$conf['url']}index.php?go={$is}'>{$is}</a>{$ad}";
}

if( $nav ) $nav = implode( $conf['sep_navig'] , $nav );

Now, to add navigational items before the default navigation, you can add the following line after the code above:
$nav = "<a href='page.php'>page name</a> &curren; " . $nav;

Change "page.php" for the page you wish to link to, and "page name" to the name of the page. You can repeat that line for every navigational link you want to appear before the default navigation.

To add navigational items after the default navigation, add the following after the original code above, and after any links you'd added before:
$nav = "<a href='page.php'>page name</a> &curren; " . $nav;

Save the page and upload it!

Tags: ,
Last Updated On: 01st February 06 by Jem
Bookmark At: StumbleUpon, Digg

tutorialtastic — ultimately better than pixelfx
Copyright © Jem Turner 2003-08. (About | Disclaimer | Link In)