vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   The Perennial Reporter (https://vborg.vbsupport.ru/showthread.php?t=176321)

jambo_1969 04-16-2008 11:05 AM

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:

<if condition="is_member_of($bbuserinfo, 6, 7, 34, 2, 5)">
<if condition="$show['reportlink']">etc etc
</if>
Any help or advice ?

Cheers

MrEyes 04-16-2008 01:02 PM

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>

Or you could also use $bbuserinfo[userid] to restrict at a user level

Opserty 04-16-2008 01:56 PM

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>


jambo_1969 04-16-2008 02:01 PM

Quote:

Originally Posted by Opserty (Post 1492145)
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>


BRILLIANT !

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:

Originally Posted by Opserty (Post 1492145)
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>


Sorry - should that not be !==!X ?

--------------- 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 ?

Dismounted 04-17-2008 05:55 AM

$bbuserinfo['userid'] != X

jambo_1969 04-17-2008 07:34 AM

Quote:

Originally Posted by Dismounted (Post 1492709)
$bbuserinfo['userid'] != X


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
  • Page Generation 0.01153 seconds
  • Memory Usage 1,730KB
  • 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
  • (8)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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