Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2011, 11:34 AM
Truth66 Truth66 is offline
 
Join Date: Oct 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Customizing Top Menu Bar for Forum Groupings

I'm new here so my appologies if this has already been raised.

I'm trying to customize my site to have Groupings of Forums accessed by the main Menu at the Top.
An example of this is located here:

http://allnurses.com/

As you can see the Top menu has more than the basic 4 tabs.

What I want is: Home Tab, Second Tab, Third Tab, Forums, Blogs, What's New

The second Tab I want linked to a specific Parent Group of Forums
The third Tab linked to a specific group of Parent Group of Forums
The fourth tab linked to a specific group of Parent Group of Forums

The User Groups would still have access to all of the forums. I just want these extra tabs to make things easier for navigation for my users, as opposed to having everything under one tab.

How do I add these additional tabs and create the links to the specific Parent Forums?

My appologies, my html knowledge is really limited.

Thanks Again
Reply With Quote
  #2  
Old 01-16-2011, 12:06 PM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In your AdminCP, go down to your Products & Plugins, and choose to create a new plugin.

The Hook Location you want to use is process_templates_complete.

Choose an appropriate Title, so you know what it is when you want to modify it later, like "Adds Tabs for Forums."

You can leave the Execution Order at 5.

The PHP Code you want is:
PHP Code:
$template_hook['navtab_start'] = 'INSERT HTML HERE';
$template_hook['navtab_middle'] = 'INSERT HTML HERE';
$template_hook['navtab_end'] = 'INSERT HTML HERE'
(Just choose ONE of those lines of PHP code, depending on where you want your tabs.)



The HTML (where I wrote INSERT HTML HERE) you want to use is:
HTML Code:
    <li><a class="navtab" href="forumdisplay.php?InsertForumID">InsertForumName</a></li>
(Replace InsertForumID and InsertForumName as necessary.)

You want THREE tabs, so it'll be more like this:
HTML Code:
    <li><a class="navtab" href="forumdisplay.php?InsertForumID">InsertForumName</a></li>
    <li><a class="navtab" href="forumdisplay.php?InsertForumID">InsertForumName</a></li>
    <li><a class="navtab" href="forumdisplay.php?InsertForumID">InsertForumName</a></li>



If you're ambitious enough, you can even make Templates for these tabs, so that when the user is in the forum that one of the Tabs links to, you can have it highlighted. :> It'll take a bit more work, so let us know if you're interested.
Reply With Quote
  #3  
Old 01-17-2011, 02:40 PM
Truth66 Truth66 is offline
 
Join Date: Oct 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your help.

I noticed that I’m only able to have one Forum ID linked from the Tab. I tried doing two just to see what would happen and the second didn’t show up.

As for the default Forum tab, is there a way to make this tab linked to a specific Forum ID?
My guess is that this tab would have to be completely removed and replaced with one of the tabs in the plugin described above. If true, how does one remove the default Forum tab?
Reply With Quote
  #4  
Old 10-21-2011, 07:51 AM
hoatran hoatran is offline
 
Join Date: Jul 2008
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to set it in oder? for example after other existing TAbs
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 02:17 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.08171 seconds
  • Memory Usage 2,193KB
  • 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_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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_postinfo_query
  • fetch_postinfo
  • 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