View Full Version : Modify header/nav of specific forums ie: forumdisplay.php?f=32
tobybird
10-30-2006, 02:58 PM
What I am looking to do is this... Let's say I have three different categories on my board. Of course each category has it's own forums. I would like to modify the header or navbar area of each category's forum to contain category specific links back to my main site.
Example: Category 1 deals with Linux, Cat 2 is Sun OS and Cat 3 MS
Headers or navbar area of cat 1 forums would contain links to Linux pages in my main site. Cat 2 forums would have Sun OS links and cat 3 would have MS links.
While I'm not a coder, I'm comfortable editing board files. My problem is, I'm not sure which to modify. Any help would be greatly appreciated! Thanks in advance.
eta: And if it is needed... I'm running 3.6.0
ericgtr
10-30-2006, 03:18 PM
Sure, this can be done with a condition in the navbar template, here's an example:
Let's say your category is forumid 1, wrap the condition around the link you want to add like this:
<if condition="in_array($GLOBALS[forumid], array(1))">
<td class="vbmenu_control"><a href="mylink.php">test</a></td>
</if>
You may also add more forumid's to this same array if you want to use the same links for more than one category:
<if condition="in_array($GLOBALS[forumid], array(1,3,5))">
<td class="vbmenu_control"><a href="mylink.php">test</a></td>
</if>
You can use this for as many different navbar links as you want, just change the forumid accordingly. :)
tobybird
10-30-2006, 03:20 PM
Sweet! I'll give it a shot. Thanks so much for the quick reply. :up:
eta: Very cool. I had to do a bit of tweaking for proper placement, but I got exactly what I was looking for. Thanks again, ericgtr!
lukemax
10-30-2006, 08:13 PM
Hey, would something like this work?
(current header)
<div id="headermenu">
<ul>
<li><a href="/main.shtml" title="Return to MyLAASP">Home</a></li>
<li><a href="" title="Available now">Available now</a></li>
<li><a href="" title="Hobbyist">Hobbyist</a></li>
<li><a href="/providers.php" title="Providers">Providers</a></li>
<li><a href="/reviews.php" title="Reviews">Reviews</a></li>
<li><a href="/chat/flashchat.php" title="Chat">Chat</a></li>
<li><a href="">Newbies Corner</a></li>
</ul>
</div>
And changed it to
<div id="headermenu">
<ul>
<li><a href="/main.shtml" title="Return to MyLAASP">Home</a></li>
<if condition="in_array($GLOBALS[forumid], array(8))">
<li id="current"><a href="/forum/forumdisplay.php?f=8" title="Available now">Available now</a></li>
</if>
<li><a href="/forum/forumdisplay.php?f=8" title="Available now">Available now</a></li>
<if condition="in_array($GLOBALS[forumid], array(4))">
<li id="current"><a href="/forum/forumdisplay.php?f=4" title="Hobbyist">Hobbyist</a></li>
</if>
<li><a href="/forum/forumdisplay.php?f=4" title="Hobbyist">Hobbyist</a></li>
<li><a href="/providers.php" title="Providers">Providers</a></li>
<li><a href="/reviews.php" title="Reviews">Reviews</a></li>
<li><a href="/chat/flashchat.php" title="Chat">Chat</a></li>
<if condition="in_array($GLOBALS[forumid], array(5))">
<li id="current"><a href="/forum/forumdisplay.php?f=5" title="Newbies Corner">Newbies Corner</a></li>
</if>
<li><a href="">Newbies Corner</a></li>
</ul>
</div>
to make the tabs "highlight" when I go to a specific forum/category
To the tabular navbar in
http://www.mylaasp.com/forum/index.php
ericgtr
10-30-2006, 08:37 PM
I'm not sure about the code you posted (haven't tried it out) but I am sure this can be achieved with the same process.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.