[BETA] Tarb Abuse Tool

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
karlg
Registered User
Posts: 10
Joined: Tue Oct 29, 2002 3:02 pm

[BETA] Tarb Abuse Tool

Post by karlg »

A very useful tool to help control abuse... Can one of you guys give it a test?

Code: Select all

##############################################################
## MOD Title: tarb abuse control
## MOD Author: Karlg < karlg@email.net > (Karl Grindley)
## MOD Description: Highly effective abuse control
## over your users.  (Tarb stands for Brat, backwards)
## MOD Version: 0.0.4
##
## Installation Level: (easy)
## Installation Time: 45 Minutes
## Files To Edit: includes/functions_post.php
##                admin/admin_users.php
##                templates/subSilver/admin/user_edit_body.tpl
##                posting.php
##                viewforum.php
##                viewtopic.php
## Included Files: N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Author Notes:
##	The theory behind this is to discourage cronic abusers,
##      spammers and rule breakers from using your forums,
##      and make them just go away.  The theory behind this mod
##      allows you the admin, to flag a user without their
##      knowledge, allow them to use the board, but all posts/
##      topics are flagged.  Any flagged topic/post is only view
##      able to the abusive user, and the administrator, but invisible
##      to everyone else.  
##
##      When you ban or delete an account, the user is immidiately aware
##      of this, which usually results in (attempted) retaliation.
##      This mod lets you secreatly flag their account and
##      lets the abuser waste their time, while leaving your
##      community alone.
##
##	To flag an abusive account, use the admin panel to edit
##      the uesr's account. Set the Tarb flag, and and all posts/
##      topics posted by that user are invisible to all other users,
##	but appears completely normal to the abusive user. All
##	tarbed posts/topics are visable to the Administarator
##	with a note next to the post/topic title.
##
## ToDo:
##   - Add PM support
##   - Add support for moderators to tarb users
##   - Add easy topic/post tarb pruning
##   - Add reports from the admin panel so an admin can see
##     all tarbed posts/topics
##   - Post/Topic tarb toggle (untarb/tarb a post/topic)
##   - Add cookie support, so when a user logs out, his/her
##     post is still viewable only to themselves
##   - Add (seperate Mod?) viral mode (so a tarbed user
##     creates/logs into another account, it will auto tarb
##     the dupe account based on the browser cookie)
##
##  NOTE: BACKUP YOUR DATABASE BEFORE PREFORMING THE BELOW
##        SQL STATEMENTS
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
alter table phpbb_users add user_tarb tinyint(1) default 0 not null;
alter table phpbb_posts add post_tarb tinyint(1) default '0' not null after post_username;
alter table phpbb_topics add topic_tarb tinyint(1) default '0' not null after topic_poster;


#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php

#
#-----[ FIND ]------------------------------------------
#
                $user_avatar = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar'] : '';
                $user_avatar_type = ( empty($user_avatar_loc) ) ? $this_userdata['user_avatar_type'] : '';


#
#-----[ AFTER, ADD ]------------------------------------------
#
                $user_tarb = ( !empty($HTTP_POST_VARS['user_tarb']) ) ? intval( $HTTP_POST_VARS['user_tarb'] ) : 0;


#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, 


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
user_tarb = $user_tarb,

#
#-----[ FIND ]------------------------------------------
#
                $user_timezone = $this_userdata['user_timezone'];
                $user_dateformat = $this_userdata['user_dateformat'];


#
#-----[ AFTER, ADD ]------------------------------------------
#
		$user_tarb = $this_userdata['user_tarb'];


#
#-----[ FIND ]------------------------------------------
#
                        $s_hidden_fields .= '<input type="hidden" name="timezone" value="' . $user_timezone . '" />';
                        $s_hidden_fields .= '<input type="hidden" name="dateformat" value="' . str_replace("\"", "&", $user_dateformat) . '" />';

#
#-----[ AFTER, ADD ]------------------------------------------
#
			$s_hidden_fields .= '<input type="hidden" name="user_tarb" value="' . $user_tarb . '" />';


#
#-----[ FIND ]------------------------------------------
#
                        'ALLOW_AVATAR_YES' => ($user_allowavatar) ? 'checked="checked"' : '',
                        'ALLOW_AVATAR_NO' => (!$user_allowavatar) ? 'checked="checked"' : '',

#
#-----[ AFTER, ADD ]------------------------------------------
#
                        'USER_TARB_YES' => ($user_tarb) ? 'checked="checked"' : '',
                        'USER_TARB_NO' => (!$user_tarb) ? 'checked="checked"' : '',


#
#-----[ FIND ]------------------------------------------
#
                        'L_SPECIAL' => $lang['User_special'],
                        'L_SPECIAL_EXPLAIN' => $lang['User_special_explain'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
                        'L_USER_TARB' => $lang['User_tarb'],


#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php

#
#-----[ IN-LINE, FIND ]------------------------------------------
#
$sql  = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id
, topic_status, topic_type, topic_vote

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
, topic_tarb

#
#-----[ IN-LINE, FIND ]------------------------------------------
# Same line as above...
) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id,
 " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
, " . $userdata['user_tarb'] . "

#
#-----[ IN-LINE, FIND ]------------------------------------------
#
$sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, 
poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
, post_tarb

#
#-----[ IN-LINE, FIND ]------------------------------------------
#
) VALUES ($topic_id, $forum_id, " . $userdata['user_id']
 . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
, " . $userdata['user_tarb'] . "

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
$lang['User_status'] = 'User is active';

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['User_tarb'] = 'User is tarbed';


#
#-----[ OPEN ]------------------------------------------
#
posting.php

#
#-----[ IN-LINE, FIND ]------------------------------------------
#
# After this line:
#submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_
#id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", 
#"''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
if ( $error_msg == ''

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
&& $userdata['user_tarb'] != "1"


#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
 //
 // Go ahead and pull all data for this topic
 //

#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( $userdata['user_rank'] != "1" )
{
  $ignore_tarbed = "AND (p.post_tarb = '0' OR (p.poster_id = '" . $userdata['user_id'] . "'))";
}

#
#-----[ FIND ]------------------------------------------
#
                AND pt.post_id = p.post_id
                AND u.user_id = p.poster_id

#
#-----[ AFTER, ADD ]------------------------------------------
#
                $ignore_tarbed

#
#-----[ FIND ]------------------------------------------
#
        $post_subject = ( $postrow[$i]['post_subject'] != '' ) ? $postrow[$i]['post_subject'] : ''; : '';
 
#
#-----[ AFTER, ADD ]------------------------------------------
#
        if ( $userdata['user_rank'] == "1" )
        {
                if ( $postrow[$i]['post_tarb'] == 1)
                        {
                                $post_subject .= " <font color=\"#AA5555\">(tarbed post)</font>" ;
                        }
                }

#
#-----[ OPEN ]------------------------------------------
#
viewforum.php

#
#-----[ FIND ]------------------------------------------
#
 // Grab all the basic data (all topics except announcements)
 // for this forum
 //

#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( $userdata['user_rank'] != "1" )
{
  $ignore_tarbed = "AND (t.topic_tarb = '0' OR (t.topic_poster = '" . $userdata['user_id'] . "'))";
}


#
#-----[ FIND ]------------------------------------------
#
                AND u2.user_id = p2.poster_id 
                AND t.topic_type <> " . POST_ANNOUNCE . " 
                $limit_topics_time

#
#-----[ AFTER, ADD ]------------------------------------------
#
                $ignore_tarbed


#
#-----[ FIND ]------------------------------------------
#
...$topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
                if ( $userdata['user_rank'] == "1" )
                {
                        if ( $topic_rowset[$i]['topic_tarb'] == 1)
                        {
                                $topic_title .= " <font color=\"#AA5555\">(tarbed topic)</font>" ;
                        }
                }

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl


#
#-----[ FIND ]------------------------------------------
#
          <td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td>
        </tr>
        <tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
          <td class="row1"><span class="gen">{L_USER_TARB}</span></td>
          <td class="row2">
                <input type="radio" name="user_tarb" value="1" {USER_TARB_YES} />
                <span class="gen">{L_YES}</span>&&
                <input type="radio" name="user_tarb" value="0" {USER_TARB_NO} />
                <span class="gen">{L_NO}</span></td>
        </tr>
        <tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

Nice idea, simple but effective 8)
Defend the game:
Image
totoelectro
Registered User
Posts: 358
Joined: Tue Dec 11, 2001 8:47 am
Location: Nimes (South of France)
Contact:

Post by totoelectro »

you have forget a ''

here
alter table phpbb_users add user_tarb tinyint(1) default '0' not null;


and this part

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
                $user_timezone = $this_userdata['user_timezone']; 
                $user_dateformat = $this_userdata['user_dateformat']; 


# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
      $user_tarb = $this_userdata['user_tarb']; 
should be

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
                $user_timezone = $this_userdata['user_timezone']; 
                $user_dateformat = htmlspecialchars($this_userdata['user_dateformat']); 


# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
      $user_tarb = $this_userdata['user_tarb']; 
Kwikms
Registered User
Posts: 85
Joined: Wed Nov 20, 2002 2:33 am
Location: Hofheim / Germany
Contact:

Post by Kwikms »

I think my english is just to bad to understand what happens here. Can you please explain what this MOD does. Who can set which users to "tarb" and what will happen then?

Thnx ;)
karlg
Registered User
Posts: 10
Joined: Tue Oct 29, 2002 3:02 pm

Post by karlg »

Kwikms wrote: I think my english is just to bad to understand what happens here. Can you please explain what this MOD does. Who can set which users to "tarb" and what will happen then?

Thnx ;)


With the limited abuse controls avaliable on most forum software, it's difficult to just get rid of abusive users. Without this mod, Let's say you have user JonSmith whom is constantly flaming and spamming your topics/forums with worthless posts. You, the site administrator, try to delete/ban JohnSmith, but he continues to come back and just create new accounts and continues to flame/spam/annoy your users. You then escalate to his ISP and/or block his entire IP from your forums, at which case he either switches to a new IP, and you can't block the whole ISP because that would block a large percent of your user base. Short of hiring a Laywer, there's real no good way to solve this situation without constant headaches and active moderation, not to mention pissed of users.

So, let's say the same scenereo, but instead of deleting/banning the user, which is where the situation started to escalate, you simply apply the Tarb flag (on the "User Admin Management" screen under the admin panel) to JohnSmith's account. ALL new posts and topics by this user are now invisible to everyone else, except to himself. JohnSmith is completely unaware of this because to him, his posts look normal. Eventually, he'll just get board and leave, which is what you and your users wanted to begin with. :wink:
Deriel
Registered User
Posts: 164
Joined: Tue Aug 27, 2002 5:16 pm
Location: Curitiba/PR - Brasil
Contact:

Post by Deriel »

The development of this MOD stopped?
xmulder
Registered User
Posts: 429
Joined: Thu Jun 27, 2002 8:37 pm

Post by xmulder »

this could be a very useful tool - ill add it l8er - thanks :D
karlg
Registered User
Posts: 10
Joined: Tue Oct 29, 2002 3:02 pm

Post by karlg »

Development hasn't stoped, but i haven't had time to finish the final beta test with the above changes. I have a board i'm planning on testing the final install. I'll see if i can get that done this weekend and post results.
DuffBeer
Registered User
Posts: 117
Joined: Sat Jan 04, 2003 1:06 am
Location: Fridge located in the UK
Contact:

Post by DuffBeer »

One question, how do you make tarbed threads/posts reappear? I tried untarbing someone, but I think it only effects posts made after the action is made (same for tarbing someone, only future posts apply.) Because I really do not want these threads/posts left hidden there while they are gone.

But other than that, this is a sweet idea and I've already installed :D

Cheers, Duff.
karlg
Registered User
Posts: 10
Joined: Tue Oct 29, 2002 3:02 pm

Post by karlg »

That's more development that needs to be done, to untarb a post/topic so it shows back up. It's really a simple addition to this mod... I'll see what i can to about adding that that as soon as possible.
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

Could you make it so you can 'tarb' someone for a certain amount of days?
Eric
AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

## Author Notes:
## The theory behind this is to discourage cronic abusers,
## spammers and rule breakers from using your forums,
## and make them just go away. The theory behind this mod
## allows you the admin, to flag a user without their
## knowledge, allow them to use the board, but all posts/
## topics are flagged. Any flagged topic/post is only view
## able to the abusive user, and the administrator, but invisible
## to everyone else.



HAHAHAH, I love that!!! Very interresting idea!

Would love to see this one complete it's development! :mrgreen:
User avatar
chAos
Former Team Member
Posts: 4032
Joined: Wed Jan 16, 2002 7:05 am
Location: Seattle, WA, US

Post by chAos »

This is so cruel !! :P

And i love it. :D
User avatar
Jaeboy
Registered User
Posts: 446
Joined: Fri Oct 18, 2002 4:42 pm
Location: HkG SAR
Contact:

Post by Jaeboy »

lol, nice one!
A personal blog :: My Blog | lalaland
AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

everyone start sending Karl an email.... :P :P let's see if we can get him to finish this, and release it to the MOD-DB :mrgreen:
Post Reply

Return to “[2.0.x] MODs in Development”