vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Customizing Top Menu Bar for Forum Groupings (https://vborg.vbsupport.ru/showthread.php?t=257222)

Truth66 01-16-2011 11:34 AM

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

Sarteck 01-16-2011 12:06 PM

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.

Truth66 01-17-2011 02:40 PM

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?

hoatran 10-21-2011 06:51 AM

How to set it in oder? for example after other existing TAbs


All times are GMT. The time now is 08:19 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.01747 seconds
  • Memory Usage 1,723KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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