vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   Want to add multiple drop-down menus in your Navbar? (https://vborg.vbsupport.ru/showthread.php?t=126649)

Chicago_VLNU_4s 10-29-2006 08:36 PM

thanks... needed this

ngaiox 10-31-2006 04:27 PM

Is there any way someone could do this for me?

If you can here are the details:

I want the super moderators and the administrators to be able to see the link.

I want the dropdown menu name to be Administration. Inside of it, I want there to be two links. Admin CP and Mod CP. Admin CP is the link only members of the usergroup Administrators can see. And Mod CP is the link only members of the usergroup Super Moderators can see. Is that going to be a problem doing this for me? I will appriciate it if you do. :)

PS: I need to learn the scripting of the templates better, lol.

Alfa1 11-19-2006 10:10 PM

Ok here ya go:
Go into your adminCP ->Styles and templates -> style manager -> default style -> select edit templates -> scroll down to 'navigation/breadcrump templates'and double click that -> navbar

Like Jennifer K says

Find:
HTML Code:

<if condition="$show['member']">
                        <td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td>
                </if>

Place this above (after editing it for your site):
HTML Code:

<if condition="is_member_of($bbuserinfo,5,6,7)">                               
<td id="stafflinks" class="vbmenu_control"><a href="$show[nojs_link]#stafflinks">Staff Links</a> <script type="text/javascript"> vbmenu_register("stafflinks"); </script></td>
</if>

Now where it says
HTML Code:

5,6,7
means super mods(5), admins(6) and mods(7)
If you dont want your super mods to see this then delete
HTML Code:

5,
The same goes for the code below.

Then find:
HTML Code:

<if condition="$show['member']">
        <!-- user cp tools menu -->
        <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>
<tr><td class="vbmenu_option"><a href="http://www.huntleyneighbors.com/forum/faq.php">FAQ</a></tr>
<tr><td class="vbmenu_option"><a href="http://www.huntleyneighbors.com/forum/view.php?pg=useragreement">User Agreement</a></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="http://www.huntleyneighbors.com/forum/memberlist.php">Members List</a></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>
                               
                <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>
               
                <tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
                <if condition="$show['pmstats']"><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>
               
                </table>
        </div>
        <!-- / user cp tools menu -->
        </if>

Place this below (after replacing "yoursite.com" with your website address):
HTML Code:

<if condition="is_member_of($bbuserinfo,5,6,7)">
<!-- Mod links menu-->
<div class="vbmenu_popup" id="stafflinks_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">Mod Links</td></tr>
<if condition="is_member_of($bbuserinfo,6)"><tr><td class="vbmenu_option"><a href="http://www.yoursite.com/forum/admincp/index.php">Admin CP</a></td></tr></if>
<if condition="is_member_of($bbuserinfo,5,6,7)"><tr><td class="vbmenu_option"><a href="http://www.yoursite.com/forum/modcp/index.php">Mod CP</a></td></tr></if>
</table>
 </div>
<!-- / staff links menu -->
</if>

With this mods can only see the modCP, not the adminCP. I have put the Mod rules in mine, but left it out for you. Have fun.

Edit: do not mind the colors above. The automerge function of this site is causing this.

So, here is my new post:

I'd like to add a link to the staff links menu which shows moderators unread posts in their forums. How can I do that?

Targowski 11-26-2006 06:47 PM

Thanks a lot, was just going to look for this on Google - haha.

ngaiox 01-07-2007 05:42 PM

Thanks! :D Many thanks!

J0iN 07-03-2007 07:58 PM

Really needed a drop down to show more links so it would fit on the page many thanks

Alfa1 07-22-2007 05:18 PM

In the 'User CP' drop down on the navbar here at vb.org, the top link is 'user control panel'. It is both dark blue, has bold white font and it is linked. What is the 'td class' value for this?
i.e. I currently have
Code:

<td class="vbmenu_option">
which makes it a grey drop down link with normal blue font, instead of a dark blue linked one.

tunistunis 12-12-2007 11:42 AM

thx

katilkuzu 02-09-2008 12:53 PM

grat job dude. thanks alot

Criminal-Minds 04-25-2009 06:54 PM

If i wanted to add multiple different Drop down boxes (i.e 2 separate boxs) How would I go about this?


All times are GMT. The time now is 06:05 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.01086 seconds
  • Memory Usage 1,767KB
  • 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
  • (1)bbcode_code_printable
  • (6)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
  • (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