vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Modify header/nav of specific forums ie: forumdisplay.php?f=32 (https://vborg.vbsupport.ru/showthread.php?t=130378)

tobybird 10-30-2006 02:58 PM

Modify header/nav of specific forums ie: forumdisplay.php?f=32
 
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:
Code:

    <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:
Code:

    <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)
HTML Code:

    <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
HTML Code:

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


All times are GMT. The time now is 08:07 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02286 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete