vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   adding an item to the navbar "menu" item (https://vborg.vbsupport.ru/showthread.php?t=192004)

ATVTorture 09-26-2008 08:04 PM

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

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 forums. In the vb articles forum is this article - How To Add Drop Down Menus To Your Navbar

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


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.

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:

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>


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


All times are GMT. The time now is 03:28 AM.

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.01044 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete