Announcement

Collapse
No announcement yet.

Additional Menu Items

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Additional Menu Items

    I need to add an additional menu item to the navbar template and do not know how to do this. Can somebody please explain to me how to add an additional drop down menu (like the Quick Links menu) to my navbar template?

  • #2
    I will explain this, adding a new pulldown behind "Log Out", of course it is possible to position it everywhere you want! All coding is done in the navbar-template, but if you would like to use phrases, you need to use the phrasesystem - which would be step 3

    Step 1 - the code on the navbar itself:
    Look for:
    Code:
    		<if condition="$bbuserinfo['userid']">
     			<td class="vbmenu_control"><a href="$vboptions[homeurl]/login.php?$session[sessionurl]do=logout" onclick="return log_out()">$vbphrase[log_out]</a></td>
      		</if>
    and add underneath:
    Code:
    			<td id="yourmenu" class="vbmenu_control"><a href="#yourmenu">$vbphrase[additional_links]</a> <script type="text/javascript"> vbmenu_register("yourmenu"); </script></td>
    That's already all. Please be aware, that "yourmenu" can be named as you like, but is has to be consistent through the whole code - it has to stay the same. $vbphrase[additional_links] is just a phrase which would be used here, if you want to use the phrase-system. See Step 3

    Step 2 - the code for the pulldown:
    Now go to the very end of the navbar-template. Search for:
    Code:
    <!-- / NAVBAR POPUP MENUS -->
      </if>
    add above:
    Code:
    <!-- yourmenu -->
      	<div class="vbmenu_popup" id="yourmenu_menu" style="display:none">
      		<table cellpadding="4" cellspacing="1" border="0">
     		<tr><td class="thead">$vbphrase[additional_links]</td></tr> 	
     		<tr><td class="vbmenu_option"><a href="http://www.yourforum.com/yourshop">$vbphrase[your_shop]</a></td></tr>
      		</table>
      	</div>
      	<!-- / yourmenu -->
    As you can see "yourmenu" is used again in the id - and that's the important part to know, which menu needs to be displayed.

    Step 3 - using the phrases:
    New phrases can always be inserted easily. To be sure, that they get displayed, insert them into the GLOBAL group and name them in a way, that you can recall the names easily. I.e.: Our forum is called "Comicforum", so I have chosen to name all new phrases like this: "cf_..." You should try to make it that way. However, in order to insert the phrase into the templates, use the following code:
    Code:
    $vbphrase[your_shop]
    where the name in the brackets is the name of the phrase itself.

    I hope this was helpful
    Last edited by Mirical Bernd; Fri 5 Mar '04, 2:31pm.

    Comment


    • #3
      OK, I understand how to add a phrase and refer to it using the $vbphrase[phrasename] command. It is obvious that I did something wrong tho.

      I added a phrase in the Global area and named it "additional_links" with the text saying "Additional Links".

      I opened up the "navbar" template and searched for
      <if condition="$bbuserinfo['userid']">
      <td class="vbmenu_control"><a href="/login.php?$session[sessionurl]do=logout" onclick="return log_out()">$vbphrase[log_out]</a></td>
      </if>
      and under that I added
      <td id="comicforum" class="vbmenu_control"><a href="#additional_links">$vbphrase[additional_links]</a> <script type="text/javascript"> vbmenu_register("additional_links"); </script></td>
      then I searched for
      <!-- / NAVBAR POPUP MENUS -->
      </if>
      Above that I added
      <!-- additional_links -->
      <div class="vbmenu_popup" id="additional_links" style="display:none">
      <table cellpadding="4" cellspacing="1" border="0">
      <tr><td class="thead">$vbphrase[additional_links]</td></tr>
      <tr><td class="vbmenu_option"><a href="/arcade.php?$session[sessionurl]">Arcade</a></td></tr>
      </table>
      </div>
      <!-- / additional_links -->
      It shows the link, but the drop down item is not showing up.

      Ideas?

      Comment


      • #4
        the id needs always to end with _menu - in your case: id="additional_links_menu"

        that should do it

        Comment


        • #5
          That did it. Thank you. It also helped when I changed the "id="comicforum" to id="addition_links". Go Figure.

          One more question. How do I change the placement of the new "Additional Links" drop down menu? I would like to have it right after "Calendar".

          Comment


          • #6
            Geeez, forgot that, corrected it

            And for the position: Search for
            Code:
            		<td class="vbmenu_control"><a href="$vboptions[homeurl]/calendar.php?$session[sessionurl]">$vbphrase[calendar]</a></td>
            and add it underneath it

            Comment


            • #7
              Nevermind, I figured it out.

              Thanks Again

              Comment


              • #8
                Here is a new question. is it possibe to have sub-menu under the new menu?

                Comment


                • #9
                  Originally posted by bitg
                  Here is a new question. is it possibe to have sub-menu under the new menu?
                  haven't tried that yet.... just try to add the same thing into the sub-menu and create a new submenu with unique idea. But really, I dunno if it works.

                  Comment


                  • #10
                    menu
                    Code:
                     <td id="index_menu" class="vbmenu_control"><a href="$vboptions[bburl]/index.php?$session[sessionurl]">Home</a> 
                     <script type="text/javascript"> vbmenu_register("index_menu"); </script></td>
                     </if>
                    tables
                    Code:
                     <div class="vbmenu_popup" id="index_menu" style="display:none">
                     		  <table cellpadding="4" cellspacing="1" border="0">
                     		 <tr><td class="thead">Home</td></tr> 	
                     		 <tr><td class="vbmenu_option"><a href="$vboptions[homeurl]">Index</a></td></tr>
                     		  <tr><td class="vbmenu_option"><a href="$vboptions[bburl]/index.php?$session[sessionurl]">Forum</a></td></tr>
                     </table>
                       </div>
                    can someone tell me whats wrong with that as i can't seem to get it right
                    rugs|cheap rugs|modern rugs|shaggy rugs|traditional rugs

                    Comment


                    • #11
                      try this:

                      <td id="index" class="vbmenu_control"><a href="$vboptions[bburl]/index.php?$session[sessionurl]">Home</a>
                      <script type="text/javascript"> vbmenu_register("index"); </script></td>
                      </if>

                      Comment


                      • #12
                        Originally posted by Mirical Bernd
                        try this:

                        <td id="index" class="vbmenu_control"><a href="$vboptions[bburl]/index.php?$session[sessionurl]">Home</a>
                        <script type="text/javascript"> vbmenu_register("index"); </script></td>
                        </if>
                        thank you finally that worked
                        rugs|cheap rugs|modern rugs|shaggy rugs|traditional rugs

                        Comment


                        • #13
                          No problem, I am glad I could help

                          Comment


                          • #14
                            I have a question. Once you add an item to the navbar such as a link to a photogallery, how do you get this to display accurately in the breadcrumbs when the user goes there?

                            Comment


                            • #15
                              This is weird

                              I followed the instructions given, but check out the down arrow under Shop Everyday J.

                              How do I get rid of it?

                              Quicklinks doesn't have it....so somehow I should be able to remove it.
                              Attached Files

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X