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)
-   -   Incorporate simple Javascript menu into my vB forum? (https://vborg.vbsupport.ru/showthread.php?t=198700)

anthroforum 12-14-2008 08:04 PM

HTML Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td align="center"> <table cellspacing="0" cellpadding="0" border="0" bgcolor="white" width="900" height="21">
<tr>
<td width="65"><img src="/images/gradients/hbf/01-topleft.gif"></td>
<td width="50%" background="/images/gradients/hbf/04-filler.gif"></td>
<td width="123"><img src="/images/gradients/hbf/02-topcentre.gif"></td>
<td width="50%" background="/images/gradients/hbf/04-filler.gif"></td>
<td width="29"><img src="/images/gradients/hbf/03-topright.gif"></td>
</tr>

<table cellspacing="0" cellpadding="0" border="0" bgcolor="white" width="900" height="57">
<tr>
<td width="258"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="/images/gradients/hbf/05.gif" border="0"></a></td>
<td width="65"><a href="usercp.php$session[sessionurl_q]"><img src="/images/gradients/hbf/06.gif" border="0"></a></td>
<td width="89"><a href="memberlist.php$session[sessionurl_q]"><img src="/images/gradients/hbf/07.gif" border="0"></a></td>
<td width="53"><a href="/photoplog/index.php$session[sessionurl_q]"><img src="/images/gradients/hbf/08.gif" border="0"></a></td>
<td width="71"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2"><img src="/images/gradients/hbf/09.gif" border="0"></a></td>
<td width="78"><img src="/images/gradients/hbf/10.gif" border="0">


<div class="vbmenu_popup" id="usercptools_menu"  align="$stylevar[left]">
                <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_contacts]</a></td></tr>
                $template_hook[navbar_quick_links_menu_pos1]

                <tr><td class="thead">$vbphrase[networking]</td></tr>
                <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=buddylist"><if condition="$show['friends_and_contacts']">$vbphrase[contacts_and_friends]<else />$vbphrase[contacts]</if></a></td></tr>
                <if condition="$show['quick_links_groups']">
                        <tr><td class="vbmenu_option"><a href="group.php$session[sessionurl_q]">$vbphrase[social_groups]</a></td></tr>
                </if>
                <if condition="$show['quick_links_albums']">
                        <tr><td class="vbmenu_option"><a href="album.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[pictures_and_albums]</a></td></tr>
                </if>
                $template_hook[navbar_quick_links_menu_pos2]

                <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_your_details]</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_pos3]

                <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[your_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_pos4]

                </table>
        </div>


</td>
<td width="66"><a href="/misc.php$session[sessionurl_q]?do=flashchat"><img src="/images/gradients/hbf/11.gif" border="0"></a></td>
<td width="58"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><img src="/images/gradients/hbf/12.gif" border="0"></a></td>
<td width="162"><img src="/images/gradients/hbf/13.gif" border="0"></td>
</tr>
 </td>

        </td>
</tr>
</table>



<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]


Lynne 12-14-2008 09:30 PM

Look at how they did it in the default navbar template. Here's the link in the navbar:
HTML Code:

                <td class="vbmenu_control"><a id="usercptools" href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
You need to modify that to have an image and put it in place of all the stuff inbetween these lines:
HTML Code:

<td width="78"><img src="/images/gradients/hbf/10.gif" border="0">

<div class="vbmenu_popup" id="usercptools_menu"  align="$stylevar[left]">
        <table cellpadding="4" cellspacing="1" border="0">

stuff
        </table>
    </div>
</td>


And then put all that stuff at the bottom like in the navbar (with display:none).

anthroforum 12-14-2008 10:14 PM

I don't know, the display:none just makes it vanish again wherever that tag is.

Lynne 12-14-2008 10:19 PM

It's going to vanish if you don't put the other code there like I suggested.

anthroforum 12-15-2008 03:45 PM

HTML Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td align="center"> <table cellspacing="0" cellpadding="0" border="0" bgcolor="white" width="900" height="21">
<tr>
<td width="65"><img src="/images/gradients/hbf/01-topleft.gif"></td>
<td width="50%" background="/images/gradients/hbf/04-filler.gif"></td>
<td width="123"><img src="/images/gradients/hbf/02-topcentre.gif"></td>
<td width="50%" background="/images/gradients/hbf/04-filler.gif"></td>
<td width="29"><img src="/images/gradients/hbf/03-topright.gif"></td>
</tr>

<table cellspacing="0" cellpadding="0" border="0" bgcolor="white" width="900" height="57">
<tr>
<td width="258"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="/images/gradients/hbf/05.gif" border="0"></a></td>
<td width="65"><a href="usercp.php$session[sessionurl_q]"><img src="/images/gradients/hbf/06.gif" border="0"></a></td>
<td width="89"><a href="memberlist.php$session[sessionurl_q]"><img src="/images/gradients/hbf/07.gif" border="0"></a></td>
<td width="53"><a href="/photoplog/index.php$session[sessionurl_q]"><img src="/images/gradients/hbf/08.gif" border="0"></a></td>
<td width="71"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2"><img src="/images/gradients/hbf/09.gif" border="0"></a></td>
<td width="78"><img src="/images/gradients/hbf/10.gif" border="0">


<div class="vbmenu_popup" id="usercptools_menu" style="display:none"  align="$stylevar[left]">
                <table cellpadding="4" cellspacing="1" border="0">

<td class="vbmenu_control"><a id="usercptools" href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>


                <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_contacts]</a></td></tr>
                $template_hook[navbar_quick_links_menu_pos1]

                <tr><td class="thead">$vbphrase[networking]</td></tr>
                <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=buddylist"><if condition="$show['friends_and_contacts']">$vbphrase[contacts_and_friends]<else />$vbphrase[contacts]</if></a></td></tr>
                <if condition="$show['quick_links_groups']">
                        <tr><td class="vbmenu_option"><a href="group.php$session[sessionurl_q]">$vbphrase[social_groups]</a></td></tr>
                </if>
                <if condition="$show['quick_links_albums']">
                        <tr><td class="vbmenu_option"><a href="album.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[pictures_and_albums]</a></td></tr>
                </if>
                $template_hook[navbar_quick_links_menu_pos2]

                <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_your_details]</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_pos3]

                <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[your_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_pos4]

                </table>
        </div>


</td>
<td width="66"><a href="/misc.php$session[sessionurl_q]?do=flashchat"><img src="/images/gradients/hbf/11.gif" border="0"></a></td>
<td width="58"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><img src="/images/gradients/hbf/12.gif" border="0"></a></td>
<td width="162"><img src="/images/gradients/hbf/13.gif" border="0"></td>
</tr>
 </td>

        </td>
</tr>
</table>



<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]

--------------- Added [DATE]1229363243[/DATE] at [TIME]1229363243[/TIME] ---------------

Maybe take it to the paid services forum,

Lynne 12-15-2008 04:37 PM

I think you need to reread what my suggestion was. You have not replaced that code in your template at all or moved all the drop-down code to the bottom of the template.


All times are GMT. The time now is 12:16 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.01256 seconds
  • Memory Usage 1,836KB
  • 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_html_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
  • (6)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