FusionBB
Back to FusionBB Forum | Purchase FusionBB | Features | FusionBB FAQ | Documentation Wiki | License

(edit)




Installation Documentation




Installation: Narrated Tutorials




Administrator-Developer Documentation



General Administration

General Customizations

Troubleshooting


Feature-Specific Topics


FusionBB Calendar

MyPaymentPal

MySQL

Particle Boxes



Users: FusionBB Profile Options




Users: FusionBB-Related FAQ



Users:General Site FAQ



Users: Information & How To's


Narrated Tutorials (.mov format)

Images

Making Posts

Posting & Viewing Messages FAQ

Managing Files & Polls

Searching

Troubleshooting



Recent Changes Printable View Page History Edit Page

(Applies to: all versions of FusionBB)


Creating a Menu Item



Please Note:

templates/fusionbb/header_left.php is the header template included and used when you have a left sidebar

templates/fusionbb/footer_right.php is the template file included and used when you have a right sidebar..

templates/fusionbb/header_both.php is the template included and used for the main portal..


Step 1)

In includes/common.php

find:

// Setup the main index link list($tabopen,$tabclose) = $this -> createNavTab('mainindex'); $template->setTemplateVar("MAININDEX","$tabopen<a href='{$conf['portal_url']}/index.php?$FBB_SESS'>{$lang_str['MAIN']}</a>$tabclose");

Add your nav link as such:

$this->createNavTabSub('mymenu',"<a href='{$conf['home_url']}/myscript1.php?$FBB_SESS'>MENUOPTION1TITLE</a>"); $this->createNavTabSub('mymenu',"<a href='{$conf['home_url']}/myscript2.php?$FBB_SESS'>MENUOPTION2TITLE</a>"); $this->createNavTabSub('mymenu',"<a href='{$conf['home_url']}/myscript3.php?$FBB_SESS'>MENUOPTION3TITLE</a>"); list($tabopen,$tabclose) = $this->createNavTab('mymenu'); $template->setTemplateVar("MYMENU","$tabopen{MYMENUTITLE}$tabclose");

Now, from the above, you get two variables:

MYMENU and mymenu

Step 2)

In templates/header_left.php

find:

<!--MEMBERS-->

and under it place:

<!--MYMENU-->

and also find:

<!--members_sub-->

and place below it:

<!--mymenu_sub-->

That will create a menu with a submenu called games with those things listed below it.

  • If you just want to add a link and not a menu:

in common.php

list($tabopen,$tabclose) = $this -> createNavTab('MYLINK');
$template->setTemplateVar("MYLINK","$tabopen<a href='{$conf['portal_url']}/mypage.php?$FBB_SESS'>MYLINKTITLE</a>$tabclose");

and then in header_left.php

find:

<!--MEMBERS-->

and under it place:

<!--MYLINK-->

and also find:

<!--members_sub-->

and place below it:

<!--mylink_sub-->

  • To line things up correctly, you need to make sure you placed the submenu item in the correct location in the header_left.php (if using left sidebar, for instance).

In other words, find

<!--MEMBERS-->

and place your menu there as so:

<!--MEMBERS-->
<!--MYLINK-->

and then find (also in header_left.php)

<!--members_sub-->

and place your submenu there

<!--members_sub-->
<!--mylink_sub-->

This is how it lines up correctly: for instance, if you put

<!--mylink_sub-->
<!--members_sub-->

the mylink submenu would line up under members menu
and the members submenu would line up under the My Link menu.


©2003-2007 InteractivePHP, Inc.
Page last modified on July 07, 2007, at 10:54 PM