![]() |
The Perennial Reporter
Hi All
I have a member who does nothing but report posts, he's been suspended etc but still continues to report. I'm thinking I can add a line into the postbit template that removes the report icon.. Would this code work if I added in the new if condition to only allow certain groups to see the icon ? I'd only be adding it to the postbit template, but worried it might break the board ? Quote:
Cheers |
I am sure I will be corrected if I am wrong, however I believe the "is_member_of" performs an additional SQL call.
I would try one of these instead: Code:
<if condition="$bbuserinfo[usergroupid] == 2"> Code:
<if condition="$bbuserinfo[usergroupid] != 2"> Code:
<if condition="$bbuserinfo[usergroupid] == 2"> Code:
<if condition="in_array($bbuserinfo[usergroupid], array(2,3,4))"> Code:
<if condition="!in_array($bbuserinfo[usergroupid], array(2,3,4))"> |
is_member_of() does not perform additional SQL queries, it merely compares the data within the [minicode]$userinfo[/minicode] variable. If the user is in a seperate usergroup then what you have is correct. If you want to merely prevent that user from reporting then you can use a conditional like:
Code:
<if condition="!$bbuserinfo['userid'] == X"> |
Quote:
Thanks for that ! PS - I know the is_member_of doesnt use SQL queries, as I have it in my navbar to show certain items to certain usergroups :D --------------- Added [DATE]1208362075[/DATE] at [TIME]1208362075[/TIME] --------------- Quote:
--------------- Added [DATE]1208413862[/DATE] at [TIME]1208413862[/TIME] --------------- Okay - that didn't work. For some reason, putting the if condition in postbit & legacy, or, just postbit/legacy, simply removes the report icon for everyone.... Anyone any ideas ? |
$bbuserinfo['userid'] != X
|
Quote:
Top man - thanks ! Could this not be built into future releases of VB ? The ability to ban users from reporting posts ? Or, is it just me who needs this ? :D |
All times are GMT. The time now is 03:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|