Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-30-2006, 02:58 PM
tobybird's Avatar
tobybird tobybird is offline
 
Join Date: Jul 2006
Posts: 374
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 10-30-2006, 03:18 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 10-30-2006, 03:20 PM
tobybird's Avatar
tobybird tobybird is offline
 
Join Date: Jul 2006
Posts: 374
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #4  
Old 10-30-2006, 08:13 PM
lukemax lukemax is offline
 
Join Date: Oct 2006
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 10-30-2006, 08:37 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:12 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.06240 seconds
  • Memory Usage 2,212KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete