View Full Version : adding an item to the navbar "menu" item
ATVTorture
09-26-2008, 08:04 PM
Where do I go if I wanna add a menu item to the navbar dropdown for "menu"?
Thanks!
Buster
Nadeemjp
09-26-2008, 09:28 PM
exactly what i came to ask !
my question is, how do i add a link to my navbar?
Lynne
09-26-2008, 10:36 PM
You both may want to familiarize yourselves with the Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=184) forums. In the vb articles forum is this article - How To Add Drop Down Menus To Your Navbar (https://vborg.vbsupport.ru/showthread.php?t=122523)
ATVTorture
09-27-2008, 01:20 PM
Lynn, neither of us are trying to do what the article you recommended suggested. I'm trying to customize the preinstalled drop-down menu and the other poster simply wants to add another item to the navbar.
Nadeemjp, to do what you want, you must edit the template for the theme that you're using. This is done through the admincp, styles and templates. For the theme you are using, choose "edit templates". The template you are looking for is the navbar template which is under "nbavigation and breadcrumb templates", and is labeled "navbar".
Now, maybe someone can actually tell me how to do what I'm trying to do.
Buster
Nadeemjp
09-27-2008, 02:01 PM
Lyne I am sorry for being unfamiliar with the format. But actually i am totally new in this world and am always seeking help. At times i post in the wrong cats and ask too obvious questions for which i apologise in advance.
as buster here said, that i do not intend to add any thing in the drop down menu. actually buster here got what i am trying to do. just like FAQ, User CP, memberlist etc in the navbar, i wanted to add CRICKET in the navbar.
@ Buster: Yes sir i exactly did what you are referring to. i was told that underneath the "calender" option, I should copy paste the code for calender, upload cricket.php file in the root directory and replace the word "calender" with cricket. However, i did it and still it didnt appear in the navbar. So i thought maybe i have to do something else too in order for it to appear in the navbar.
So if someone p@lease be kind enough to guide me, i would really appreciate:)
thank you in advance
Lynne
09-27-2008, 02:24 PM
Nadeemjp, the Articles forum also has articles on just how to add links to the navbar. It's a very helpful forum. That being said, here is the area in a default navbar around the calendar area with a new link added in red (change "yourpage.php" and "Your Page" to whatever you want):
$template_hook[navbar_buttons_left]
<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
<if condition="$vboptions['enablememberlist']">
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
</if>
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<td class="vbmenu_control"><a href="yourpage.php$session[sessionurl_q]">Your Page</a></td>
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></td>
</if>
<if condition="$show['member']">
<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
Buster, you may want to look over that article just to see what the basic premise is for making a drop-down. I can't write out the code for you since there is no drop-down called "Menu" for me to add a link to. You would be adding to the navbar template down near the bottom where all the PAGENAV POPUP stuff is.
ATVTorture
09-27-2008, 05:31 PM
Lynne, let me try to be more specific. In the default theme, as this forum is using, there's a menu item called "Quick Links". In my theme it's called "Menu" actually. So, what I want to do is modify that "Quick Links" menu to have another item of my choosing in it. However, I don't know where it is defined. Do you know?
Thanks!
Buster
Lynne
09-27-2008, 07:15 PM
The drop-down part of the Quick Links (menu in your case) is defined at the bottom of the navbar in the area where it says "NAVBAR POPUP MENUS". For the Quick Links drop-down, the comment right above them says "<!-- user cp tools menu -->" There are several 'sections' you could add your link to. What you do really depends on where you want to add it. You could use a template hook (search the articles forums - "template hook" "articles" "titles only") or you could modify the template. If you wanted to modify the template and wanted to add Your Page at yourpage.php between Subscribed Threads and Your Profile, you would do it like this:
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="yourpage.php$session[sessionurl_q]" rel="nofollow">Your Page</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[your_profile]</a></td></tr>
ATVTorture
09-28-2008, 05:40 PM
Worked like a champ!
Thanks for pointing me to the correct area of Navbar. Obviously I hadn't read down through it enough.
Buster
Nadeemjp
09-28-2008, 10:49 PM
thanx lynne for the great help. i shall try it.
Dear sir, it worked beautifully.
thank you very much.
actually i was adding like this:
<td class="navm"><a href="cricket.php$session[sessionurl_q]">$vbphrase[LiveScoreCricket]</a></td> But I tried yours above this code and it did appear. Thanks.
Gio~Logist
09-28-2008, 11:54 PM
thanx lynne for the great help. i shall try it.
Dear sir, it worked beautifully.
thank you very much.
actually i was adding like this:
<td class="navm"><a href="cricket.php$session[sessionurl_q]">$vbphrase[LiveScoreCricket]</a></td> But I tried yours above this code and it did appear. Thanks.
That's because you have a custom style ;)
Nadeemjp
09-29-2008, 12:18 AM
Actually I have one default style and 10 other styles (morbid 10 flavors). the code I mentioned above, was not helping me in the default as well as for the other styles. Then I wrote exactly what lyne told me above the one mentioned above and then bingo there you go !!! it wordked.
so it means that if i didnt have had those custom styles, then the one I mentioned would have worked?
Lynne
09-29-2008, 03:27 AM
That's because you have a custom style ;)
Actually, I'm guessing it's because the phrase "$vbphrase[LiveScoreCricket]" doesn't exist. He was following the example without understanding what the phrase meant.
Nadeemjp
09-29-2008, 07:12 AM
yes lynne you are perfectly right. i didnt understand the meaning and was simply copying the calneder line and just changing the names.......i guess this field is not that easy....
nonetheless, thank you very much lyne, i appreciate that.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.