vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Moderators can see the Mod CP link (https://vborg.vbsupport.ru/showthread.php?t=104841)

JsnakeJ 01-08-2006 10:00 PM

Moderators can see the Mod CP link
 
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.

Daniel 01-09-2006 01:52 AM

Nice, I think you made two of the same thread though.

EDIT: Oops, sorry. I just realised that was for 3.0.12 :P My apoligies.

Submerge 01-09-2006 04:34 AM

Nevermind

FROGGYJ 01-09-2006 09:26 PM

this doesn't work for me with 3.5.1. Confirmed usergroup id's. As soon as I hit save it just goes to a blank page instead of returning to the edit template screen....and the link does not show. I changed it to only show <if condition="is_member_of(7)"> and still no go. Any clue?

YOimYO 01-11-2006 10:32 AM

Quote:

Originally Posted by FROGGYJ
this doesn't work for me with 3.5.1. Confirmed usergroup id's. As soon as I hit save it just goes to a blank page instead of returning to the edit template screen....and the link does not show. I changed it to only show <if condition="is_member_of(7)"> and still no go. Any clue?

I have the same problem in 3.5 gold :S

thx neways ....

we_scooter 01-19-2006 09:45 PM

i like this MOD

I have this concern .

If I want a condition saying (if usergroup Admin or MODERATOR) show "this" else show "blablabla")

what should the code be
:disappointed:

???

Paul M 01-20-2006 12:47 AM

The code to do this is already in 3.5.3, just commented out.

cyberhypnotic 01-20-2006 11:43 PM

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!

Paul M 01-20-2006 11:53 PM

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.

cyberhypnotic 01-21-2006 05:00 PM

Paul, is there any possible way to allow ONLY a certain usergroup ID to view the ModCP?

I have a Moderator that I want to be able to view it and have permission to use the menu in the ModCP.

If I uncomment that line, it will allow ALL Mods permission to use it and I don't want all Mods to use all of the menu options on the ModCP.


All times are GMT. The time now is 04:45 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.01275 seconds
  • Memory Usage 1,736KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_quote_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