The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
This should help, just change the condition from the forumid to the usergroup id - Disable Post Report Link for a forum
|
#3
|
|||
|
|||
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? |
#4
|
||||
|
||||
Probably....
PHP Code:
|
#5
|
|||
|
|||
Thanks for the reply. Unfortuately that doesnt appear to work.
Should I try "usergroup" instead of "userinfo"? |
#6
|
|||
|
|||
try:
usergroupid |
#7
|
||||
|
||||
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'].
|
#8
|
|||
|
|||
Thanks. That worked
|
#9
|
|||
|
|||
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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|