Change location: ($template_hook['navbar_end'] in my example)
- navbar_end -> At the end to the navbar
- navbar_start -> At the beginning of the navbar
- navbar_after_getnew -> After "New Posts"
- navbar_after_pm -> After "Private Messages"
- navbar_after_faq -> After "Faq"
- navbar_after_calendar -> After "Calendar"
- navbar_after_community -> After "Community" button
but I have not been able to get the dropdown menus such as search and quick links to work.
Thanks!
Isn't this the same as http://www.vbulletin.org/forum/showthread.php?t=228338
Isn't this the same as http://www.vbulletin.org/forum/showthread.php?t=228338
No, this article is for navbar, no navtab.
If you can help us code this... we are willing to pay.
We tried this hack (http://www.vbulletin.org/forum/showthread.php?t=200684&highlight=tabs), and everything works fine, other than getting dropdown menus to work with the tab list.
Is there a way to have this work on the CMS as well?
thank you for this very good
thanks alot ... this is very useful
I installed this hack. It is great.
I am using a customised menu to search new posts in specific categories. - using this hack.
One problem I am facing is, after the execution of the search?.., the tab switches to "What's New ?" tab. Original search menu is under Forums, how to use this menu option but not switch the tab to What's New ?
Thanks in advance.
my forum : http://www.r2iclubforums.com/forums/
Hi, what if I just want a link there. I mean just like, new post, private messages faq or calender?
Thanks in advance. :)
Its possible a sub-sub-sub menu ? thanks
Also want to just make a single link in CMS area (home page).
You'll notice, instead of the actual subbits, I have a raw variable called "catbits". The code for getting the catbits would be as follows:
$categories = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "media_category");
while ($category = $vbulletin->db->fetch_array($categories))
{
$templater = vB_Template::create('media_NAVTAB_bit');
$templater->register('categoryID', $category['categoryID']);
$templater->register('catName', $category['catName']);
$catbits .= $templater->render();
}
Where would I put this code? And how do I register the $catbits variable into the hook?
--------------- Added 1269835210 at 1269835210 ---------------
Okay... trying things out, I was able to get it working by using this plugin....
if (THIS_SCRIPT == 'media')
{
$vbulletin->options['selectednavtab'] = 'media';
}
I addet this but the Problem is that it is shown if i click on the "Forum" Button. I addet a "Portal"-Button. How can i make that it appears there and not by the Forum Button?
This artilce is about adding the sub-menus, not the navtabs. You need to have the correct condition around your navtab to show it at the correct place. You should ask your question in the modification thread that you use for the navtab.
But this has nothing to do with the modification, because i am sure many persons want to add sub-menus as example under the standard buttons like "whats new" and the "blog" and not only by the "forum" button so the question is how to specify that
And if you wrote the navtab correctly, then you would have the submenus showing. I have an article in my profile on how to correctly write a plugin to create a navtab with submenus.
Thank you very much Lynne your article was the perfect description to solve my problem. Only thing i still need is to know how to translate (add Phrases) to this new buttons. Because i am using a multilingual Forum
Thank you very much Lynne your article was the perfect description to solve my problem. Only thing i still need is to know how to translate (add Phrases) to this new buttons. Because i am using a multilingual Forum
Instead of putting text for the links:
<a href="link.php">My Link</a>
Use phrases (you will need to enter them into the phrase manager as global phrases):
<a href="link.php">$vbphrase[my_link]</a>
Thank you i addet all the submenus i needet. Only two are making me problems
1. The "Who's Online" Menu. I get this Error Message showing if i write it like that
Parse error: syntax error, unexpected T_STRING in /www/htdocs/w00d3776/vbulletin/includes/class_bootstrap.php(537) : eval()'d code on line 84
If i write it like Whos Online without ' it makes no problems but why cant i write it like in the Original way?
Parse error: syntax error, unexpected T_STRING in /www/htdocs/w00d3776/vbulletin/includes/class_bootstrap.php(537) : eval()'d code on line 82
hope that a solution for this problems exists thanks for any help
If you are writing this in php output, you need to escape the character if that is what you have surrounding the output - \'
I am not sure how to do that i think i can solve the first problem with writing Whos Online and add the correct writing to phrases but i am not sure how to change the Open contacts popup to make it work
--------------- Added 1304101672 at 1304101672 ---------------
Adding the phrases is making me problems i did it step by step but it looks like this now
Hi, I want to ask, how to make submenu in my Home tab?
Hi, I want to ask, how to make submenu in my Home tab?
Same way. Only find the template_hook names in the vbcms_navbar_link template.
Same way. Only find the template_hook names in the vbcms_navbar_link template.
Thank you, that's works.:up:
Excuse me for the stupid question, but how to add another drop-down menu next to the first one?
Thank you so much for this!! How do you make it visible only to a secondary usergroup?
So this is not in 4.1.9? "process_templates_complete"
So this is not in 4.1.9? "process_templates_complete"
That hook location still exists.
Is it possible with this hack (using the 2nd method Allan described) to create a second set of submenus that follow from the first? A bit like what was described in Post #21 (http://www.vbulletin.org/forum/showpost.php?p=2182394&postcount=21)?
I have a large number of links and it would be useful to use a categorised set of sub-menus.
Thanks for posting up how to do this.
Same way. Only find the template_hook names in the vbcms_navbar_link template.
How about just adding a single Navbar link to my Home/Forum/Blog Navbar (no submenus)?
What would be the correct coding for that?
Thanks!
How about just adding a single Navbar link to my Home/Forum/Blog Navbar (no submenus)?
That is what I used in order to get the link on my homepage.
I would also like to ask for insight as to how to set the link so that only users with permissions can see the link.
Put a condition around it.
if (is_member_of($vbulletin->userinfo, x, y, z) {
code
}
Put a condition around it.
if (is_member_of($vbulletin->userinfo, x, y, z) {
code
}
Lynne, Thanks for the response. I used the following code in total and I didn't get a parsing error.
if (is_member_of($vbulletin->userinfo, Administrators)) {
$template_hook['vbcms_navbar_end'] .= '<li><a href="mylink">My Link</a></li>';
}
However, as the Admin I cannot see the link. Also, how would I add in usergroup names for permissions if the usergroup names have spaces in them?
Thanks again for your help :)
x,y, and z are the usergroupids, not usergroup names. Replace Administrator with the usergroupid of your Administrator usergroup.
Excellent! Thanks again Lynne, it worked perfectly.
update 4.2.0 and not found please ...
I'm wondering if anyone can advise on this?
VBulletin has special PHP variables that you can use in notices, such as {userid} and {username}, which will generate an output specific to the user.
I would like to use these variables in a search string (I know this works in notices) but, obviously, it doesn't work in these dropdowns because the search string is in javascript and won't be parsed (see example code below).
Is it somehow possible to get the special variable parsed server-side, then handed over to the javascript?
I've seen people talk about it, but nobody's provided a solution.
The variable you would use would depend on the template you use it in. Most likely you would be wanting $bbuserinfo[username]
haha... I'm afraid you might need to guide me a little more than that.
Is it possible to modify the code above so that I can understand where that variable would go and how it would be passed over to the javascript / hyperlink?
--------------- Added 1367648798 at 1367648798 ---------------
Any Idea how to add this code
<li class="popupmenu">
<a href="javascript://" class="popupctrl">Menu test</a>
<ul class="popupbody popuphover">
<li><a href="http://www.vbulletin-ressources.com/forum">test 1</a></li>
<li><a href="http://www.vbulletin-ressources.com/forum">test 2</a></li>
<li><a href="http://www.vbulletin-ressources.com/forum">test 3</a></li>
</ul>
</li>
Seems people don't want to mess with updating this anymore.
Mega Menu? Nested dropdowns? Put a menu with links inside a menu?
Seems people don't want to mess with updating this anymore.
Mega Menu? Nested dropdowns? Put a menu with links inside a menu?
This article covers one thing - adding a sub-menu downdown to the navbar. There is nothing in the description that says anything about covers those other items.