PDA

View Full Version : Customizing Top Menu Bar for Forum Groupings


Truth66
01-16-2011, 11:34 AM
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:

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

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

<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, 07:51 AM
How to set it in oder? for example after other existing TAbs