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
  #12  
Old 01-30-2006, 02:40 PM
Trana Trana is offline
 
Join Date: Apr 2005
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The last one looks the cleanest.

Thanks again!
Reply With Quote
  #13  
Old 01-30-2006, 04:23 PM
Guest210212002
Guest
 
Posts: n/a
Default

Anytime.

[high]* Guest210212002 eyes the install button[/high]
Reply With Quote
  #14  
Old 01-30-2006, 07:10 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh lovely!
Reply With Quote
  #15  
Old 01-31-2006, 11:53 PM
GatorV GatorV is offline
 
Join Date: Jul 2005
Location: Mexico
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<!-- Admin Tools Menu Element -->
	<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>
<!-- /Admin Tools Menu Element -->
Won't this enable too see the links if they view source code, no matter what usergroup are no?

I ask this because I installed this to put a dropdown to some special search tools, and if anyone does right click and view source can get the links...
Reply With Quote
  #16  
Old 02-01-2006, 01:59 AM
Guest210212002
Guest
 
Posts: n/a
Default

That's a great point, and wrapping the bottome code in a conditional is something I overlooked, thank you! This is a better way to do it.

Original post is updated with the new code.

To fix your existing navbar template:

Find:
Code:
<if condition="in_array($bbuserinfo['usergroupid'], array(7))">
Replace with:
Code:
<if condition="$show['admincplink']">
Find:
Code:
<!-- Admin Tools Menu Element -->
Add Below:

Code:
<if condition="$show['admincplink']">
Find:
Code:
<!-- /Admin Tools Menu Element -->
Add above:
Code:
</if>
Reply With Quote
  #17  
Old 02-06-2006, 08:34 AM
Luggruff's Avatar
Luggruff Luggruff is offline
 
Join Date: Apr 2005
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, now that the <if condition="in_array($bbuserinfo['usergroupid'], array(7))"> and such is gone, and I suck at coding.. how can I set more than the admin usergroup?
Like if I want it to show for moderators too.. (6 and 7)?
Or if I want a seperate menu for mods and one for admins?

Edit: Fixed.

Just replaced the <if condition="$show['admincplink']"> with <if condition="in_array($bbuserinfo['usergroupid'], array(7))"> again. No one can see the code anyways now. Just the <!-- Admin content menu --> but nothing in between.
Reply With Quote
  #18  
Old 02-07-2006, 10:40 AM
Omranic's Avatar
Omranic Omranic is offline
 
Join Date: Jan 2005
Location: Egypt
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice
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:42 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.07714 seconds
  • Memory Usage 2,279KB
  • Queries Executed 22 (?)
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
  • (12)bbcode_code
  • (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
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (5)postbit_onlinestatus
  • (8)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