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
Moderators can see the Mod CP link Details »»
Moderators can see the Mod CP link
Version: 1.00, by JsnakeJ JsnakeJ is offline
Developer Last Online: Jul 2013 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-08-2006 Last Update: Never Installs: 25
Template Edits
 
No support by the author.

Thanks to cyberhypnotic for fixing my mistake.

Just a simple hack to allow your moderators to view the Mod CP link just like your Super Moderators and Administrators can.

Open your Footer template.

Find:
Code:
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
Replace with:

Code:
<if condition="$bbuserinfo[usergroupid] == '6' OR $bbuserinfo[usergroupid] == 'Super Mod Group ID' OR $bbuserinfo[usergroupid] == 'Moderator Group ID'"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
Screenshot isn't needed. This should work on any version of vBulletin 3.5.x or vBulletin 3.0.x.

You can get the 3.0.x version here.

Please make sure that you enter the correct groups.

Show Your Support

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

Comments
  #12  
Old 01-25-2006, 03:53 AM
jeddah_eyes jeddah_eyes is offline
 
Join Date: Aug 2005
Location: ksa
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanx man . it good to add some saftey fro ur vb
Reply With Quote
  #13  
Old 02-06-2006, 07:49 PM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me installs - Thank You
Reply With Quote
  #14  
Old 02-07-2006, 09:32 AM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

seam to be a problem in 3.5.2

could you please make one that works with it?

error

Code:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in includes/adminfunctions_template.php(3537) : eval()'d code on line 60

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
forum error after clicking continue
Code:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in public_html/global.php(513) : eval()'d code on line 60
Reply With Quote
  #15  
Old 02-07-2006, 09:39 AM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
You shouldn't need to do any template changes, revert the change and look for this in global.php

Code:
$show['admincplink'] = iif($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'], true, false);
// This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
// $show['modcplink'] = iif(can_moderate(), true, false);
$show['modcplink'] = iif ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] OR $permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'], true, false);
Uncomment the bold line, and comment out the line below it.
Thanks Paul! very usful!!!!
Reply With Quote
  #16  
Old 02-22-2006, 07:49 PM
JsnakeJ JsnakeJ is offline
 
Join Date: Mar 2005
Location: Pennsylvania
Posts: 231
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
You shouldn't need to do any template changes, revert the change and look for this in global.php

Code:
$show['admincplink'] = iif($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'], true, false);
// This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
// $show['modcplink'] = iif(can_moderate(), true, false);
$show['modcplink'] = iif ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] OR $permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'], true, false);
Uncomment the bold line, and comment out the line below it.
Nice work Paul.
Reply With Quote
  #17  
Old 03-02-2006, 07:31 AM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cyberhypnotic
It actually didn't work for me. I had to change

Code:
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
And replace it with:

Code:
<if condition="$bbuserinfo[usergroupid] == '6' OR $bbuserinfo[usergroupid] == 'Super Mod Group ID' OR $bbuserinfo[usergroupid] == 'Moderator Group ID'"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>
It worked that way. My only concern is that I was hoping it would allow ONE of my forum Moderators access to that ModCP. Does anyone know how to allow that in a code somewhere? I'd greatly appreciate it!
Thanks for the working code. This hsould be placed in the first post.

As far as one mod goes, try this:
Code:
<if condition="$bbuserinfo[usergroupid] == '6' OR $bbuserinfo[usergroupid] == 'Super Mod Group ID' OR $bbuserinfo[userid] == 'Moderator USER ID'">$vbphrase[mod] -
Reply With Quote
  #18  
Old 11-05-2007, 06:28 PM
peterpigman peterpigman is offline
 
Join Date: May 2006
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
You shouldn't need to do any template changes, revert the change and look for this in global.php

Code:
$show['admincplink'] = iif($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'], true, false);
// This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
// $show['modcplink'] = iif(can_moderate(), true, false);
$show['modcplink'] = iif ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] OR $permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'], true, false);
Uncomment the bold line, and comment out the line below it.
Yeah that works. I didn't realise moderators didn't have access.
Reply With Quote
  #19  
Old 01-30-2008, 10:52 PM
River_rush River_rush is offline
 
Join Date: Mar 2004
Location: Basingstoke
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
You shouldn't need to do any template changes, revert the change and look for this in global.php

Code:
$show['admincplink'] = iif($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'], true, false);
// This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
// $show['modcplink'] = iif(can_moderate(), true, false);
$show['modcplink'] = iif ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] OR $permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'], true, false);
Uncomment the bold line, and comment out the line below it.
Cheers for that, got me out of a hole
Reply With Quote
  #20  
Old 08-14-2008, 06:57 AM
fulviods fulviods is offline
 
Join Date: Jan 2005
Posts: 150
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks work for me on 3.7.2
Reply With Quote
  #21  
Old 05-17-2009, 05:48 AM
peleh peleh is offline
 
Join Date: May 2009
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked on 3.8.2
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 12:40 AM.


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.09253 seconds
  • Memory Usage 2,315KB
  • Queries Executed 25 (?)
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
  • (11)bbcode_code
  • (5)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete