vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - Hide Infraction Link For Moderators If They Are Not Moderating The Forum (https://vborg.vbsupport.ru/showthread.php?t=124061)

orban 08-14-2006 10:00 PM

Hide Infraction Link For Moderators If They Are Not Moderating The Forum
 
Create a new plugin:

Product: vBulletin
Hook Location: postbit_display_complete
Title: Hide Infraction Link For Moderators If They Are Not Moderating The Forum
Execution Order: 5
Plugin PHP Code:
Code:

if ($this->registry->userinfo['permissions']['usergroupid'] == 7 AND !can_moderate($this->thread['forumid']))
{
    $show['infractionlink'] = false;
}

Plugin is Active: Yes

That's it.


You might want to adjust the 7 if your moderator usergroup id isn't 7.

Note that this only hides the link and doesn't prevent them manually going to the URL.

y2krazy 08-15-2006 10:00 PM

<font color="red">*y2krazy clicks install.</font>

orban 08-15-2006 10:01 PM

Really weird this isn't build it, makes absolutely no sense to be honest.

BCC 08-16-2006 06:19 AM

/me Clicks Install

Thanks, Cant this Be Built? and Uploaded as an .xml File?

orban 08-16-2006 06:24 AM

Added an .xml file. I thought because it's so small there's no need for one, but oh well. :D

cynix2 08-16-2006 03:47 PM

hey i made this
https://vborg.vbsupport.ru/showthread.php?t=124125
cuz i was trying for the same thing you are
hope you dont mind that i borrowed your plugin, if you'd like i'll list you as a co-writer/supporter

orban 08-16-2006 03:51 PM

Sure, I don't mind.

Great spot, didn't look quite in it, because I trust my mods, but they were just annoyed by the button in every post (so I removed that one).

cynix2 08-16-2006 05:25 PM

my mods are a little power hungry

Paul M 08-16-2006 06:16 PM

Why do you have the usergroup test in there ?

Acido 08-17-2006 05:00 AM

This is not working if the user have Moderator as additional usergroup. Please, can you help me with code for "is member of" or something like?
I can't get the correct sentence.

Thanx!


All times are GMT. The time now is 12:34 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.00999 seconds
  • Memory Usage 1,727KB
  • 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
  • (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