Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Administrative Tools Dropdown Details »»
Administrative Tools Dropdown
Version: 1.10, by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-28-2006 Last Update: 01-29-2006 Installs: 11
Template Edits
 
No support by the author.

Administrative Tools Dropdown Menu

What it does: Adds a dropdown menu visible only to the Administrator group for Admin tools and related links.

Time to install: 5 Minutes
Difficulty: Easy
Templates: 1
Phrases: 1

Step 1:

AdminCP -> Languages & Phrases -> Phrase Manager -> Add New Phrase
Phrase Type: Global
Product: vBulletin
Varname: navadmin
Text: Admin Tools

Step 2:

Style & Templates -> Style Manager -> (Your Style) -> Edit Templates -> Navigation / Breadcrumb Templates -> navbar

Find:
Code:
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
Add AFTER:

Code:
<!-- Admin Menu -->
<if condition="$show['admincplink']">
	<if condition="$show['popups']">
	<!-- start vBMenu control element -->
        	<td class="vbmenu_control" id="AdminMenu">
	        <a STYLE="text-decoration:none" href="#">$vbphrase[navadmin]</a>
        	<script type="text/javascript">
	        <!--
	        vbmenu_register("AdminMenu");
        	//-->
	        </script>
	        </td>   
	<!-- end vBMenu control element -->
          </if>
</if>
<!-- /Admin Menu -->
Find:

Code:
<!-- / NAVBAR POPUP MENUS -->
Add ABOVE:

Code:
<!-- Admin Tools Menu Element -->
<if condition="$show['admincplink']">
	<div class="vbmenu_popup" id="AdminMenu_menu" style="display:none">
		<table cellpadding="4" cellspacing="1" border="0">
		<tr><td class="thead">Admin Tools</span></td></tr>
		<tr><td class="vbmenu_option"><a href="http://option1">First Option</a></td></tr>
		<tr><td class="vbmenu_option"><a href="http://option2">Second Option</a></td></tr>
	        <tr><td class="vbmenu_option"><a href="http://option3">Third Option</a></td></tr>
	        </table>
	</div>
</if>
<!-- /Admin Tools Menu Element -->
Change http://option1/2/3 to the full URL of the option you'd like to link. For example, if you wanted to put a link to the AdminCP in the dropdown, the code would be:

Code:
<tr><td class="vbmenu_option"><a href="http://www.yourdomain.tld/forum/admincp/index.php">Admin CP</a></td></tr>
"First/Second/Third Option" is simply the text displayed in the dropdown, edit it to suit whatever it is you're linking to. I personally don't use this for the AdminCP, but I find it useful for linking to PSIStats, Moderator Statistics and my VPS Server's Control Panel.

Screenshot attached.

Please Click if you are using this. Thanks!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-29-2006, 10:13 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice idea
Reply With Quote
  #3  
Old 01-29-2006, 10:32 PM
Lizard King Lizard King is offline
 
Join Date: Jan 2005
Location: Mersin
Posts: 907
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a quick question what is different then regular dynamic pop-up menus ?

Nothing
Reply With Quote
  #4  
Old 01-29-2006, 11:25 PM
Guest210212002
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Lizard King
Just a quick question what is different then regular dynamic pop-up menus ?

Nothing
Well if you want to nitpick, the difference is the conditional, and the fact that I didn't see anything like this posted on here.

Not every hack has to be revolutionary dude. I find this handy, so I took the time to post it up and share it with the community. If this makes one single person's life easier, my time spent putting it together was well spent.
Reply With Quote
  #5  
Old 01-30-2006, 12:31 AM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sharing your mod. Could you also attach your instructions in a .txt file? Thanks.
Reply With Quote
  #6  
Old 01-30-2006, 12:31 AM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Simple but useful, thanks Chris-777
Clicked install
Reply With Quote
  #7  
Old 01-30-2006, 01:02 AM
Guest210212002
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Tony G
Thanks for sharing your mod. Could you also attach your instructions in a .txt file? Thanks.
Whoops! Pardon that, edited.
Reply With Quote
  #8  
Old 01-30-2006, 12:47 PM
Trana Trana is offline
 
Join Date: Apr 2005
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great mini hack for those of us that can't do any of our own code.

I am using this as an option in my existing drop downs in order to get to my Administration forum:

<!-- Admin Menu -->
<if condition="in_array($bbuserinfo['usergroupid'], array(7))">
<tr><td class="vbmenu_option">
<a href="/forum/forumdisplay.php?f=3">Administration</a>
</td></tr>
</if>
<!-- /Admin Menu -->

However, it only works for members who are ONLY in the Moderator group (#7). It doesn't seem to work for the accounts that are both Admins and Moderators (6+7). Is there any way to fix this?

Thanks!
Reply With Quote
  #9  
Old 01-30-2006, 01:02 PM
Guest210212002
Guest
 
Posts: n/a
Default

Yep, change:

Code:
<if condition="in_array($bbuserinfo['usergroupid'], array(7))">
To:

Code:
<if condition="in_array($bbuserinfo['usergroupid'], array(6, 7))">
Reply With Quote
  #10  
Old 01-30-2006, 01:22 PM
Guest210212002
Guest
 
Posts: n/a
Default

You can do it this way as well. I only use the array because of personal preference.

Code:
<if condition="$bbuserinfo['usergroupid'] == 6 OR $bbuserinfo['usergroupid'] == 7">
or
Code:
<if condition="is_member_of($bbuserinfo, 6, 7)">
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04980 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (5)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete