vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=228313

[HOW TO - vB4] Create a New Tab in the navbar (with template)
by ragtek
18 Nov 2009 19:30

2 Attachment(s)
I know that lynne allready postet an article, but here's a other way:

This tutorial will show you, how to add own links to your navbar.
(In the tutorial i'll use the code for my news add-on)


1. create a template (ragtek_news_navbar)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

2. Create a plugin at the hook process_templates_complete

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As you see, i've defined "ragteknews" on my news.php page.If ragteknews is defined, $vbulletion->options['selectednavtab'] will be set to ragteknews.
Thats important because where using a condition in the template:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


taffy056 18 Nov 2009 20:07

Can I ask where do you place the plugin?

In truth I am getting a bit lost with this, why can't the CMS simply place links where you want them, I like subdreamer's way of doing this I think!

ragtek 18 Nov 2009 20:16

Sorry, strange that it's gone away. I've edited my post;)

And the hook is process_templates_complete

LoveStream 19 Nov 2009 02:33

Quote:

Originally Posted by ragtek (Post 1916742)
Sorry, strange that it's gone away. I've edited my post;)

And the hook is process_templates_complete

Thank you. I hope it. :)

Hoagie 21 Nov 2009 01:10

1 Attachment(s)
Man this is awesome. When I am displaying the page I created the forums tab is still highlighted....am I missing something or did I forget to change something.....

Thanks for the help!

ragtek 21 Nov 2009 07:56

whats your code?

Hoagie 21 Nov 2009 15:25

Which code? The plugin code?

ragtek 21 Nov 2009 16:40

Plugin and template code

VonDoom 21 Nov 2009 16:59

Very cool and simple, thanks for this.

Hoagie 21 Nov 2009 17:18

Plug In Code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Template Code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Anseur 21 Nov 2009 23:32

Is your templace called "member_ranks" or something else?

Hoagie 22 Nov 2009 03:33

Its called vbcms_ranks

Please tell me its not that simple.......I knew it would be something simple I was over looking...

Zaiaku 23 Nov 2009 00:32

Perfect! I didn't want to have to edit the files especially since its in beta.

ragtek 23 Nov 2009 06:47

Quote:

Originally Posted by Hoagie (Post 1918365)
Plug In Code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Template Code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And what's with the template for the navbar?
I think you made it completely false

Hoagie 23 Nov 2009 18:38

vbcms_navbar_add

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



All times are GMT. The time now is 07:41.

Powered by vBulletin® Version 3.8.13
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.