Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2008, 08:04 PM
ATVTorture ATVTorture is offline
 
Join Date: Sep 2008
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default adding an item to the navbar "menu" item

Where do I go if I wanna add a menu item to the navbar dropdown for "menu"?

Thanks!
Buster
Reply With Quote
  #2  
Old 09-26-2008, 09:28 PM
Nadeemjp Nadeemjp is offline
 
Join Date: Aug 2008
Location: Japan
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

exactly what i came to ask !

my question is, how do i add a link to my navbar?
Reply With Quote
  #3  
Old 09-26-2008, 10:36 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You both may want to familiarize yourselves with the Articles forums. In the vb articles forum is this article - How To Add Drop Down Menus To Your Navbar
Reply With Quote
  #4  
Old 09-27-2008, 01:20 PM
ATVTorture ATVTorture is offline
 
Join Date: Sep 2008
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 09-27-2008, 02:01 PM
Nadeemjp Nadeemjp is offline
 
Join Date: Aug 2008
Location: Japan
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 09-27-2008, 02:24 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Code:
        $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.
Reply With Quote
  #7  
Old 09-27-2008, 05:31 PM
ATVTorture ATVTorture is offline
 
Join Date: Sep 2008
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 09-27-2008, 07:15 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Code:
<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>
Reply With Quote
  #9  
Old 09-28-2008, 05:40 PM
ATVTorture ATVTorture is offline
 
Join Date: Sep 2008
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked like a champ!

Thanks for pointing me to the correct area of Navbar. Obviously I hadn't read down through it enough.

Buster
Reply With Quote
  #10  
Old 09-28-2008, 10:49 PM
Nadeemjp Nadeemjp is offline
 
Join Date: Aug 2008
Location: Japan
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Code:
<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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:27 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.05099 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete