The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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"> ..what you put here would only show for users in usergroup 2.. </if> Code:
<if condition="$bbuserinfo[usergroupid] != 2"> ..what you put here would only show for users not in usergroup 2.. </if> Code:
<if condition="$bbuserinfo[usergroupid] == 2"> ..what you put here would only show for users in usergroup 2.. </if> Code:
<if condition="in_array($bbuserinfo[usergroupid], array(2,3,4))"> ..what you put here would only show for users in usergroup 2, 3 & 4.. </if> Code:
<if condition="!in_array($bbuserinfo[usergroupid], array(2,3,4))"> ..what you put here would only show for users not in usergroup 2, 3 & 4.. </if> |
#3
|
|||
|
|||
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"> ... </if> |
#4
|
|||
|
|||
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 --------------- 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 ? |
#5
|
||||
|
||||
$bbuserinfo['userid'] != X
|
#6
|
|||
|
|||
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 ? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|