PDA

View Full Version : Forum Display Enhancements - Different Navbar Links for Each Forum


TCE Killa
03-16-2008, 10:00 PM
As Requested (https://vborg.vbsupport.ru/showpost.php?p=1462025&postcount=2)

This little modification gives you the chance to add a second row of links as a navbar for each forum.

Example, you have a forum called Sports.... With this modification, you can add different navbar links to that forum.

So it will be called Sports, you enter the Sports forum area, then a new navbar will be displayed underneith the original navbar, you can add all topics to sports such as - Football, Baseball, Boxing, MMA etc... with a link of your choice when you click on it.

Simply find in Forum Display:

$navbar

Add below:

<if condition="$forumid == XX">
<!-- nav buttons bar -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="1" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_option"><a href="CUSTOMLINK.php$session[sessionurl]"><b>CUSTOM TITLE</b></td></a></table></tr></if></if><br />

Change the forumid (XX) to the forums ID you want the navbar row to work in, and change the CUSTOMLINK to the links you want the text to go to... The CUSTOM TITLE can be called whatever you want for it.

If you would like more custom links on your navbar row, repeat the CUSTOMLINK & vbmenu_option code for how many you actually want.

If you want a different row of navbars for multiple forums, just repeat the whole code underneith, changing the forumid (XX) to a another forum.

Enjoy! Please mark installed if you use, thankyou:up:

RvG2
03-17-2008, 04:23 PM
cool! :)

iogames
03-17-2008, 11:14 PM
Thanks! :up:
Just wandering, can I do the same with a header? I mean, for each forum the header will send me to the link that I need?

and can: <a href="CUSTOMLINK.php$session[sessionurl]"><b>CUSTOM TITLE</b></td></a></table></tr></if></if><br /> use an URL?

TCE Killa
03-20-2008, 09:32 PM
Thanks! :up:
Just wandering, can I do the same with a header? I mean, for each forum the header will send me to the link that I need?

and can: <a href="CUSTOMLINK.php$session[sessionurl]"><b>CUSTOM TITLE</b></td></a></table></tr></if></if><br /> use an URL?

Yeah, you can definetely do this. Have a look at my other mod (Home in Navbar) to find out how to do that.

Yeah, the custom link can go to any url you like... I.e <a href="http://www.example.com/index.php$session.... etc....

Let me know if you get stuck, thanks.

almera
06-02-2008, 02:56 PM
Does this only work for different forums, or can I use this to have different sub menus in different .php files? I use vBa and have .php-files for my picture section, blog section, news section etc.

Does it work with vB 3.7?

TCE Killa
01-26-2010, 01:42 AM
^Ofcourse