vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   vbpopup pulldown menus (https://vborg.vbsupport.ru/showthread.php?t=162008)

wtrk 11-05-2007 08:40 PM

vbpopup pulldown menus
 
i need a little help. could somebody provide me with an example of how to make a custom pulldown menu for the navbar? ive looked through the navbar code and i cant tell where a popup starts and where it ends. so if you could just show me the begining a sample of how to add list items and the end, it would be a huge help. thanks!

Analogpoint 11-05-2007 08:59 PM

Here's the navbar link in a table cell

Code:

<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>
And it's corresponding menu div near the bottom of the navbar template

Code:

        <div class="vbmenu_popup" id="usercptools_menu" style="display:none">
                <table cellpadding="4" cellspacing="1" border="0">
               
                <tr><td class="thead">$vbphrase[quick_links]</td></tr>               
                <if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
                <tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
                <tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
                $template_hook[navbar_quick_links_menu_pos1]
                               
                <tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
                <if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
                <!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
                <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
                <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
                $template_hook[navbar_quick_links_menu_pos2]
               
                <tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
                <if condition="$show['pmmainlink']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
                <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="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
                <if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
                $template_hook[navbar_quick_links_menu_pos3]
               
                </table>
        </div>


wtrk 11-05-2007 09:11 PM

THANKS.

so in order to create a custom menu, besides the contents of the menu table, what do i need to change? like im sure i change "id="usercptools"" to what the new menu is called? then do i also change this: "vbmenu_register("usercptools");" to the name for the new menu?

tell me why this doesnt work:

Code:

<!-- MENU: NAVBAR TABLE -->

<table cellpadding="4" cellspacing="1" border="0">

<tr>
<td id="about" class="vbmenu_control">ABOUT<script type="text/javascript"> vbmenu_register("about"); </script></td>
</tr>
</table>
<!-- /MENU: NAVBAR TABLE -->

<!-- MENU: ABOUT-->
<div class="vbmenu_popup" id="about" style="display:none">
                <table cellpadding="4" cellspacing="1" border="0">
               
                <tr><td class="thead">ABOUT</td></tr>
                <tr><td class="vbmenu_option">1</td></tr>
                <tr><td class="vbmenu_option">2</td></tr>
                <tr><td class="vbmenu_option">3</td></tr>
                       
                </table>
</div>
<!-- /MENU: ABOUT -->


Freesteyelz 11-06-2007 02:58 AM

Replace the above with:

Code:

<!-- MENU: NAVBAR TABLE -->
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td id="about" class="vbmenu_control"><a href="$show[nojs_link]#about" accesskey="3">ABOUT</a><script type="text/javascript"> vbmenu_register("about"); </script></td>
</tr>
</table>
<!-- /MENU: NAVBAR TABLE -->
<!-- MENU: ABOUT-->
<div class="vbmenu_popup" id="about_menu" style="display:none">
  <table cellpadding="4" cellspacing="1" border="0">
 
  <tr><td class="thead">ABOUT</td></tr>
  <tr><td class="vbmenu_option">1</td></tr>
  <tr><td class="vbmenu_option">2</td></tr>
  <tr><td class="vbmenu_option">3</td></tr>
 
  </table>
</div>
<!-- /MENU: ABOUT -->


What I've highlighted in red is what you were missing. :)


All times are GMT. The time now is 05:01 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.01198 seconds
  • Memory Usage 1,732KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete