vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How To Hide Report Post Link From Certain Usergroups? (https://vborg.vbsupport.ru/showthread.php?t=224104)

BENBOBBY 09-28-2009 11:51 AM

How To Hide Report Post Link From Certain Usergroups?
 
Hi,

Probably an easy question, but cant seem to find an opition to hide the report post link from particular usergroups. I only want 4 usergroups to be able to report posts.

Or do I need to add some code to the postbit in order to do this?

Thanks.

Lynne 09-28-2009 02:45 PM

This should help, just change the condition from the forumid to the usergroup id - Disable Post Report Link for a forum

BENBOBBY 09-28-2009 02:50 PM

Hi Lynne my saviour! I saw that thread already actually...just wondered if there was an offical way to do it from the usergroup options in AdminCP. I guess not!

Would it be something like:

if ($usergroup != '5,6,7')
{
$show['reportlink'] = false;
}

Is that the right syntax? How do you use OR opporators with vbulletin?

Lynne 09-28-2009 03:39 PM

Probably....
PHP Code:

if (is_member_of($vbulletin->userinfo567)) 
{
    
$show['reportlink'] = false;



BENBOBBY 09-28-2009 05:43 PM

Thanks for the reply. Unfortuately that doesnt appear to work. :(

Should I try "usergroup" instead of "userinfo"?

snakes1100 09-28-2009 05:48 PM

try:
usergroupid

Lynne 09-28-2009 06:01 PM

Whoops.... you are using the postbit_display_complete hook, so try $this->registry->userinfo instead of $vbulletin->userinfo or even $vbulletin->userinfo['usergroupid'] instead... or even $this->registry->userinfo['usergroupid'].

BENBOBBY 09-29-2009 09:47 AM

Thanks. That worked :)

ragtek 09-29-2009 10:46 AM

as wrote in https://vborg.vbsupport.ru/showthread.php?t=214226 don't forget that this is not enought!
you could call the file direct;) report.php?p=1891910


All times are GMT. The time now is 07:18 AM.

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.00995 seconds
  • Memory Usage 1,726KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete