yellow card 1 4 11em
Post on 31-May-2018
215 Views
Preview:
TRANSCRIPT
-
8/15/2019 yellow card 1 4 11em
1/31
################################################################ MOD Title: Yellow card## MOD Author: Niels < ncr@db9.dk > (Niels Chr. R d) http://mods.db9.dk## MOD Description: Also known as "card system" This mod will make 4 coloredbuttons beside users post (red,yellow,green and blue)## ADMIN can in ACP configure inside witch forum the buttonsare visible## Red = ban, Yelow = warn, Green = unban, Blue = report to
moderators## Emails are send to the user, notifying about the event.#### MOD Version: 1.4.11.## Compatibility: 2.0.6#### Installation Level: Moderate## Installation Time: 40 minutes (1mn by EasyMOD of Nuttzy)## Files To Edit: 22## posting.php## search.php## viewforum.php## viewtopic.php
## admin/admin_board.php## admin/admin_forumauth.php## admin/admin_forums.php## admin/admin_ug_auth.php## admin/admin_users.php## admin/admin_user_ban.php## includes/auth.php## includes/constants.php## includes/smtp.php## includes/usercp_register.php## language/lang_english/lang_admin.php## language/lang_english/lang_main.php## language/lang_french/lang_admin.php
## language/lang_french/lang_main.php## templates/subSilver/posting_body.tpl## templates/subSilver/search_body.tpl## templates/subSilver/subSilver.cfg## templates/subSilver/viewtopic_body.tpl## templates/subSilver/admin/board_config_body.tpl## templates/subSilver/admin/user_edit_body.tpl#### Included Files: 16## card.php## language/lang_english/email/ban_block.tpl## language/lang_english/email/ban_reactivated.tpl## language/lang_english/email/ban_warning.tpl
## language/lang_english/email/card_block.tpl## language/lang_english/email/repport_post.tpl## language/lang_french/email/ban_block.tpl## language/lang_french/email/ban_reactivated.tpl## language/lang_french/email/ban_warning.tpl## language/lang_french/email/card_block.tpl## language/lang_french/email/repport_post.tpl## templates/subSilver/images/icon_bcard.gif## templates/subSilver/images/icon_bhotcard.gif## templates/subSilver/images/icon_gcard.gif## templates/subSilver/images/icon_rcard.gif
-
8/15/2019 yellow card 1 4 11em
2/31
## templates/subSilver/images/icon_ycard.gif################################################################## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the## latest version of this MOD. Downloading this MOD from other sites could causemalicious code## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD'snot offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/################################################################ Author Notes:#### This MOD is compatible and can be installed by EasyMOD## of Nuttzy (but is not officially EasyMOD Compliant)!## http://www.phpbb.com/phpBB/viewtopic.php?t=124436#### However, on alpha releases of EM SQL commands are not performed!## Then, meanwhile beta or final release (with DB alterations## capabilities), you must update your database manually by## copying the last_visit_db_update.php file in your phpBB## root directory, execute it with your navigator and after,
## delete it.#### In any case, if you install this MOD manually or using an## alpha release of EM, please run this file NOW, before## editing phpBB files by EM or manually!!!## Otherwise, you may have an error message during your next## connection.#### Moreover, because EM 0.0.10a can not already manage actions## for not necessarily existing language, the other language(s)## modifications provided with this MOD can not be automatically## installed. So, if you need other language(s), copy the## email sub-directories manually from their languages
## directories in root/language/, and apply the instructions## in the translations/ directory, if available of course.#### For updates, check this official link...## http://mods.db9.dk/viewforum.php?f=4################################################################## MOD History:#### 2004-04-22 - version 1.4.11.## - improved report post forum selector in ACP-> general config#### 2004-04-22 - version 1.4.10.
## - fix to posting.php (remove of $extra_message_body) + added extra line#### 2003-12-23 - Version 1.4.9## - fix to posting.php, (lock_subject) -> ($lock_subject)#### 2003-12-04 - Version 1.4.8## - fixed a isue with posting.php, witch would cause a error to happen onspecific server configurations.#### 2003-10-13 - Version 1.4.7## - correction to the code in viewtopic.php about the javascript pop-up
-
8/15/2019 yellow card 1 4 11em
3/31
#### 2003-10-09 - Version 1.4.6## - changed the included emails to confirm to 206 standarts, + updatedcard.php#### 2003-09-28 - Version 1.4.5## - some changes into card.php regarding RY card##
## 2003-09-02 - Version 1.4.4## - improved admin_user_ban.php#### 2003-08-26 - Version 1.4.3## - made the how-to more EM compatible with other mods installed#### 2003-08-24 - Version 1.4.2## - corrected viewtopic.php and viewtopic_body.tpl to correctly managewarning numbers showen beside posts#### 2003-08-22 - Version 1.4.1## -## 2003-08-10 - Version 1.4.0
## - Merge part 1 & 2## - Fix many instructions errors## - Add French translation## - Update instructions to work with 2.0.6## - How-to rewrite to be EasyMOD compatible#### ????-??-?? - Version 1.3.9## - changed the admin/admin_baord_config_body.tpl#### ????-??-?? - Version 1.3.8## - minor change for 2.0.4#### ????-??-?? - Version 1.3.7
## - missed a change in admin_ug_auth.php#### ????-??-?? - Version 1.3.6## - corrected the admin_users.php file#### ????-??-?? - Version 1.3.5## - Corrected a find tag in the how-to auth.php#### ????-??-?? - Version 1.3.4## - now yellow/red cards can be made/removed with-in the admin ban interface#### ????-??-?? - Version 1.3.3## - correction of typo in the how-to - thanks to "kreativ"
#### ????-??-?? - Version 1.3.2## - the ADD SQL, had a syntax#### ????-??-?? - Version 1.3.1## - corrected a typo in the board_config_body.tpl#### ????-??-?? - Version 1.3.0## - now posible to specify the "post a report" forum ID#### ????-??-?? - Version 1.2.1
-
8/15/2019 yellow card 1 4 11em
4/31
## - seciruty update, semi vital (recormented)#### ????-??-?? - Version 1.2.0## - re-written for phpBB2 version 2.0.2.#### ????-??-?? - Version 1.1.4## - lang_admin.php changed##
## ????-??-?? - Version 1.1.3## - history started, changed some entry in admin.php#### ????-??-?? - Version 1.1.0## - release for phpBB 2.0.0.#### 2002-04-10 - Version 1.0.0## - release for phpBB RC-2#### 2002-01-01 - Version 0.9.0## - beta release for phpBBe RC-1################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related ToThis MOD################################################################-----[ SQL ]-------------------------------------------------## If you use an alpha release of EasyMOD, this instructions will not be executed!# Please read author notes to update your database.#copy yellow_card_db_update.php to yellow_card_db_update.phpexecute yellow_card_db_update.phpdelete yellow_card_db_update.php
##-----[ COPY ]------------------------------------------------#copy root/card.php to card.phpcopy root/language/lang_english/email/ban_block.tpl tolanguage/lang_english/email/copy root/language/lang_english/email/ban_reactivated.tpl tolanguage/lang_english/email/copy root/language/lang_english/email/ban_warning.tpl tolanguage/lang_english/email/copy root/language/lang_english/email/repport_post.tpl tolanguage/lang_english/email/
copy translations/lang_french/email/ban_reactivated.tpl tolanguage/lang_french/email/ban_reactivated.tplcopy translations/lang_french/email/ban_block.tpl tolanguage/lang_french/email/ban_block.tplcopy translations/lang_french/email/ban_warning.tpl tolanguage/lang_french/email/ban_warning.tplcopy translations/lang_french/email/repport_post.tpl tolanguage/lang_french/email/repport_post.tplcopy translations/lang_french/email/card_block.tpl tolanguage/lang_french/email/card_block.tpl
-
8/15/2019 yellow card 1 4 11em
5/31
copy root/templates/subSilver/images/icon_bcard.gif to templates/subSilver/images/copy root/templates/subSilver/images/icon_bhotcard.gif totemplates/subSilver/images/copy root/templates/subSilver/images/icon_gcard.gif to templates/subSilver/images/copy root/templates/subSilver/images/icon_rcard.gif to templates/subSilver/images/copy root/templates/subSilver/images/icon_ycard.gif to templates/subSilver/images/
#
#-----[ OPEN ]------------------------------------------------#posting.php
##-----[ FIND ]------------------------------------------------#$params = array('forum_id'
##-----[ IN-LINE FIND ]----------------------------------------#);
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, 'lock_subject' => 'lock_subject'
##-----[ FIND ]------------------------------------------------#if ( $post_id ){
#
#-----[ BEFORE, ADD ]-----------------------------------------#
if ( $postreport ){
$redirect = 'viewtopic.$phpEx?' . POST_POST_URL . '=$postreport';$post_append = '';
} else
##-----[ FIND ]------------------------------------------------#case 'editpost':
$redirect =break;}
##-----[ AFTER, ADD ]------------------------------------------#$redirect .= ($post_reportid) ? '&post_reportid=$post_reportid' : '';
##-----[ FIND ]------------------------------------------------
-
8/15/2019 yellow card 1 4 11em
6/31
#submit_post(
##-----[ BEFORE, ADD ]-----------------------------------------#if ($lock_subject){
$url = " ";
$message = addslashes(sprintf($lang['Link_to_post'],$url,"")).$message;}
##-----[ FIND ]------------------------------------------------#user_notification(}
##-----[ AFTER, ADD ]------------------------------------------
#if ($lock_subject){
$url = " ";
$return_message =$lang['Report_stored']."
".sprintf($lang['Send_report'],$url,"");$return_meta = str_replace($post_id,$lock_subject,$return_meta);}
##-----[ FIND ]------------------------------------------------
#$preview_message = str_replace("\n", '
', $preview_message);##-----[ AFTER, ADD ]------------------------------------------#$url = " ";$extra_message_body= sprintf($lang['Link_to_post'],$url,"");$preview_message = ($lock_subject) ?stripslashes($extra_message_body).$preview_message : $preview_message;
##-----[ FIND ]------------------------------------------------#// User default entry point//
##-----[ AFTER, ADD ]------------------------------------------#$postreport=(isset($HTTP_GET_VARS['postreport']))? intval($HTTP_GET_VARS['postreport']) : 0;
-
8/15/2019 yellow card 1 4 11em
7/31
if ($postreport){
$sql = 'SELECT topic_id FROM '.POSTS_TABLE.' WHEREpost_id="'.$postreport.'"';
if( !($result = $db->sql_query($sql) ))message_die(GENERAL_ERROR, "Couldn't get post subject information");
$post_details = $db->sql_fetchrow($result);$post_topic_id=$post_details['topic_id'];
$sql = 'SELECT pt.post_subject FROM '.POSTS_TEXT_TABLE.' pt, '.POSTS_TABLE.'p WHERE p.topic_id="'.$post_topic_id.'" AND pt.post_id=p.post_id ORDER BYp.post_time ASC LIMIT 1';
if( !($result = $db->sql_query($sql) ))message_die(GENERAL_ERROR, "Couldn't get topic subject
information".$sql);$post_details = $db->sql_fetchrow($result);$subject='('.$postreport.')'.$post_details['post_subject'];$lock_subject=$postreport;
} else{
$subject = '';$lock_subject='';
}
##-----[ FIND ]------------------------------------------------#$username = ($userdata['session_logged_in']) ? $userdata['username'] : '';$poll_title = '';$poll_length = '';$subject = '';
##-----[ REPLACE WITH ]----------------------------------------#
// Start replacement - Yellow card MOD$username = ($userdata['session_logged_in']) ? $userdata['username'] : '';$poll_title = '';$poll_length = '';// End replacement - Yellow card MOD
##-----[ FIND ]------------------------------------------------#$hidden_form_fields = '';
#
#-----[ AFTER, ADD ]------------------------------------------#$hidden_form_fields .= ($lock_subject) ? '':'';
##-----[ FIND ]------------------------------------------------#// Generate smilies listing for page output
-
8/15/2019 yellow card 1 4 11em
8/31
##-----[ BEFORE, ADD ]-----------------------------------------#$page_title = ($postreport || $lock_subject) ? $lang['Post_a_report']:$page_title;
#
#-----[ FIND ]------------------------------------------------#'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
##-----[ REPLACE WITH ]----------------------------------------#
// Start replacement - Yellow card admin MOD'S_NOTIFY_CHECKED' => ($is_auth['auth_read'] ) ? (( $notify_user ) ?'checked="checked"' : '') : 'DISABLED' ,'S_LOCK_SUBJECT' => ($lock_subject) ? ' READONLY ' : '',// End replacement - Yellow card admin MOD
##-----[ OPEN ]------------------------------------------------#search.php
##-----[ FIND ]------------------------------------------------#if ( isset($HTTP_POST_VARS['search_keywords'])
##-----[ BEFORE, ADD ]-----------------------------------------
#$only_bluecards = ( isset($HTTP_POST_VARS['only_bluecards']) ) ?( ($HTTP_POST_VARS['only_bluecards']) ? TRUE : 0 ) : 0;
##-----[ FIND ]------------------------------------------------#WHERE poster_id IN ($matching_userids)";
##-----[ AFTER, ADD ]------------------------------------------#
$sql .= ($only_bluecards) ? " AND post_bluecard>0 " : "";
##-----[ FIND ]------------------------------------------------#$sql = "SELECT m.post_idFROM
##-----[ BEFORE, ADD ]-----------------------------------------
-
8/15/2019 yellow card 1 4 11em
9/31
#$search_msg_only .= ($only_bluecards) ? " AND p.post_bluecard>0 ANDm.post_id=p.post_id " : "";
##-----[ AFTER, ADD ]------------------------------------------#" . (($only_bluecards) ? ','.POSTS_TABLE . ' p ' : '') . "
##-----[ FIND ]------------------------------------------------#$search_msg_only = ( $search_fields ) ? "OR post_subject LIKE '$match_word'" : '';$sql = "SELECT post_id
FROM " . POSTS_TEXT_TABLE . "WHERE post_text LIKE '$match_word'
##-----[ REPLACE WITH ]----------------------------------------#$search_msg_only = ( $search_fields ) ? "OR pt.post_subject LIKE '$match_word'" :
'';$search_msg_only .= ($only_bluecards) ? " AND p.post_bluecard>0 ANDpt.post_id=p.post_id " : "";
$sql = "SELECT pt.post_idFROM " . POSTS_TEXT_TABLE . "
pt " . (($only_bluecards) ? ','.POSTS_TABLE . ' p ' : '') . "WHERE pt.post_text LIKE '$match_word'
##-----[ FIND ]------------------------------------------------#//// Output the basic page
##-----[ BEFORE, ADD ]-----------------------------------------#$l_only_bluecards = ($userdata['user_level']>=ADMIN) ? ' '.$lang['Search_only_bluecards'] :'';
##-----[ FIND ]------------------------------------------------#'L_TOPICS' =>'L_POSTS' =>
##-----[ AFTER, ADD ]------------------------------------------#'L_ONLY_BLUECARDS' => $l_only_bluecards,
##-----[ OPEN ]------------------------------------------------#viewforum.php
-
8/15/2019 yellow card 1 4 11em
10/31
##-----[ FIND ]------------------------------------------------#$s_auth_can .= ( ( $is_auth['auth_vote']
##-----[ AFTER, ADD ]------------------------------------------
#$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] . '
' : '';$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] .'
' : '';$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] . '
' : '';##-----[ OPEN ]------------------------------------------------#viewtopic.php
#
#-----[ FIND ]------------------------------------------------#$order_sql = (
##-----[ IN-LINE FIND ]----------------------------------------#f.auth_attachments
##-----[ IN-LINE AFTER, ADD ]----------------------------------#, f.auth_ban, f.auth_greencard, f.auth_bluecard
##-----[ FIND ]------------------------------------------------#$sql = "SELECT t.topic_id, t.topic_title
##-----[ IN-LINE FIND ]----------------------------------------#" . $count_sql
##-----[ IN-LINE BEFORE, ADD ]---------------------------------
#, f.auth_ban, f.auth_greencard, f.auth_bluecard
##-----[ FIND ]------------------------------------------------#$sql = "SELECT u.username
##-----[ IN-LINE FIND ]----------------------------------------#
-
8/15/2019 yellow card 1 4 11em
11/31
u.user_allowsmile
##-----[ IN-LINE AFTER, ADD ]----------------------------------#, u.user_warnings, u.user_level
#
#-----[ FIND ]------------------------------------------------#$s_auth_can .= ( ( $is_auth['auth_vote']
##-----[ AFTER, ADD ]------------------------------------------#$s_auth_can .= ( $is_auth['auth_ban'] ) ? $lang['Rules_ban_can'] . "
" : "";$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] ."
" : "";$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] . "
" : "";##-----[ FIND ]------------------------------------------------#$delpost = '';}}
##-----[ AFTER, ADD ]------------------------------------------#if($poster_id != ANONYMOUS && $postrow[$i]['user_level'] != ADMIN){
$current_user = str_replace("'","\'",$postrow[$i]['username']);
if ($is_auth['auth_greencard']){
$g_card_img = ' ';
}else{
$g_card_img = '';}$user_warnings = $postrow[$i]['user_warnings'];$card_img = ($user_warnings) ? (( $user_warnings = $board_config['max_user_bancard']) ? '' : '';//for ($n=0 ; $n
-
8/15/2019 yellow card 1 4 11em
13/31
$b_card_img = ' ';
}} else $b_card_img = '';
// parse hidden filds if cards visible
$card_hidden = ($g_card_img || $r_card_img || $y_card_img || $b_card_img) ?'' :'';
##-----[ FIND ]------------------------------------------------#'DELETE' =>
##-----[ AFTER, ADD ]------------------------------------------#
'USER_WARNINGS' => $user_warnings,
'CARD_IMG' => $card_img,'CARD_HIDDEN_FIELDS' => $card_hidden,'CARD_EXTRA_SPACE' => ($r_card_img || $y_card_img || $g_card_img || $b_card_img) ?' ' : '',
##-----[ FIND ]------------------------------------------------#'U_MINI_POST' =>
##-----[ AFTER, ADD ]------------------------------------------#
'U_G_CARD' => $g_card_img,'U_Y_CARD' => $y_card_img,'U_R_CARD' => $r_card_img,'U_B_CARD' => $b_card_img,'S_CARD' => append_sid("card.".$phpEx),
##-----[ OPEN ]------------------------------------------------#admin/admin_board.php
##-----[ FIND ]------------------------------------------------
#//// Escape any quotes
##-----[ BEFORE, ADD ]------------------------------------------------#//report forum selection$sql = "SELECT f.forum_name, f.forum_id
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " cWHERE c.cat_id = f.cat_id ORDER BY c.cat_order ASC, f.forum_order ASC";
-
8/15/2019 yellow card 1 4 11em
14/31
if ( !($result = $db->sql_query($sql)) ){
message_die(GENERAL_ERROR, "Couldn't obtain forum list", "", __LINE__,__FILE__, $sql);}$report_forum_rows = $db->sql_fetchrowset($result);$db->sql_freeresult($result);$report_forum_select_list = '';
$report_forum_select_list .= '' . $lang['None'] . '';for($i = 0; $i < count($report_forum_rows); $i++){
$report_forum_select_list .= '' . $report_forum_rows[$i]['forum_name'] .'';}$report_forum_select_list .= '';$report_forum_select_list = str_replace("value=\"".$new['report_forum']."\">","value=\"".$new['report_forum']."\" SELECTED>*" ,$report_forum_select_list);
##-----[ FIND ]------------------------------------------------
#"L_ENABLE_PRUNE" =>
##-----[ AFTER, ADD ]------------------------------------------#'L_BLUECARD_LIMIT' => $lang['Bluecard_limit'],'L_BLUECARD_LIMIT_EXPLAIN' => $lang['Bluecard_limit_explain'],'L_BLUECARD_LIMIT_2' => $lang['Bluecard_limit_2'],'L_BLUECARD_LIMIT_2_EXPLAIN' => $lang['Bluecard_limit_2_explain'],'L_MAX_USER_BANCARD' => $lang['Max_user_bancard'],'L_MAX_USER_BANCARD_EXPLAIN' => $lang['Max_user_bancard_explain'],'L_REPORT_FORUM' => $lang['Report_forum'],
'L_REPORT_FORUM_EXPLAIN' => $lang['Report_forum_explain'],
##-----[ FIND ]------------------------------------------------#"PRUNE_NO" =>
##-----[ AFTER, ADD ]------------------------------------------#'BLUECARD_LIMIT' => $new['bluecard_limit'],'BLUECARD_LIMIT_2' => $new['bluecard_limit_2'],'MAX_USER_BANCARD' => $new['max_user_bancard'],
'S_REPORT_FORUM' => $report_forum_select_list,
##-----[ OPEN ]------------------------------------------------#admin/admin_forumauth.php
##-----[ FIND ]------------------------------------------------#// View
-
8/15/2019 yellow card 1 4 11em
15/31
##-----[ IN-LINE FIND ]----------------------------------------#Poll
##-----[ IN-LINE AFTER, ADD ]----------------------------------
#Warn/ban Unban Repport
##-----[ FIND ]------------------------------------------------#$simple_auth_ary = array(0 => array(
##-----[ IN-LINE FIND ]----------------------------------------#),
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, AUTH_MOD, AUTH_ADMIN, AUTH_REG
##-----[ FIND ]------------------------------------------------#1 => array(
##-----[ IN-LINE FIND ]----------------------------------------
#),
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, AUTH_MOD, AUTH_ADMIN, AUTH_REG
##-----[ FIND ]------------------------------------------------#2 => array(
##-----[ IN-LINE FIND ]----------------------------------------#),
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, AUTH_MOD, AUTH_ADMIN, AUTH_REG##-----[ FIND ]------------------------------------------------
-
8/15/2019 yellow card 1 4 11em
16/31
#3 => array(
##-----[ IN-LINE FIND ]----------------------------------------#),
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, AUTH_MOD, AUTH_ADMIN, AUTH_REG##-----[ FIND ]------------------------------------------------#4 => array(
##-----[ IN-LINE FIND ]----------------------------------------#),
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, AUTH_MOD, AUTH_ADMIN, AUTH_REG##-----[ FIND ]------------------------------------------------#5 => array(
##-----[ IN-LINE FIND ]----------------------------------------#
),
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, AUTH_MOD, AUTH_ADMIN, AUTH_REG##-----[ FIND ]------------------------------------------------#6 => array(
##-----[ IN-LINE FIND ]----------------------------------------
#),
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, AUTH_MOD, AUTH_ADMIN, AUTH_REG
##-----[ FIND ]------------------------------------------------#
-
8/15/2019 yellow card 1 4 11em
17/31
$forum_auth_fields = array(
##-----[ IN-LINE FIND ]----------------------------------------#);
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------#, 'auth_ban', 'auth_greencard', 'auth_bluecard'
##-----[ FIND ]------------------------------------------------#']);
##-----[ IN-LINE FIND ]----------------------------------------#);
##-----[ IN-LINE REPLACE WITH ]--------------------------------#,
##-----[ AFTER, ADD ]------------------------------------------#'auth_ban' => $lang['Ban'],'auth_greencard' => $lang['Greencard'],'auth_bluecard' => $lang['Bluecard']);
##-----[ OPEN ]------------------------------------------------#admin/admin_forums.php
##-----[ FIND ]------------------------------------------------#"auth_pollcreate" =>
##-----[ IN-LINE FIND ]----------------------------------------#
AUTH_REG
##-----[ IN-LINE AFTER, ADD ]----------------------------------#,
##-----[ AFTER, ADD ]------------------------------------------#
-
8/15/2019 yellow card 1 4 11em
18/31
"auth_ban" => AUTH_MOD,"auth_greencard" => AUTH_ADMIN,"auth_bluecard" => AUTH_REG
##-----[ OPEN ]------------------------------------------------#admin/admin_ug_auth.php
##-----[ FIND ]------------------------------------------------#$forum_auth_fields = array(
##-----[ IN-LINE FIND ]----------------------------------------#);
##-----[ IN-LINE BEFORE, ADD ]---------------------------------
#, 'auth_ban', 'auth_greencard', 'auth_bluecard'
##-----[ FIND ]------------------------------------------------#);
##-----[ IN-LINE FIND ]----------------------------------------#);
##-----[ IN-LINE REPLACE WITH ]--------------------------------#,
##-----[ AFTER, ADD ]------------------------------------------#'auth_ban' => AUTH_BAN,'auth_greencard' => AUTH_GREENCARD,'auth_bluecard' => AUTH_BLUECARD);
#
#-----[ FIND ]------------------------------------------------#']);
##-----[ IN-LINE FIND ]----------------------------------------#);
##-----[ IN-LINE REPLACE WITH ]--------------------------------
-
8/15/2019 yellow card 1 4 11em
19/31
#,
##-----[ AFTER, ADD ]------------------------------------------#'auth_ban' => $lang['ban_card'],'auth_greencard' => $lang['Greencard'] ,
'auth_bluecard' => $lang['Bluecard']);
##-----[ FIND ]------------------------------------------------#SET auth_view = 0,WHERE
##-----[ IN-LINE FIND ]----------------------------------------#WHERE
##-----[ IN-LINE BEFORE, ADD ]----------------------------------#, auth_ban = 0, auth_greencard = 0, auth_bluecard = 0
##-----[ OPEN ]------------------------------------------------#admin/admin_user_ban.php
##-----[ FIND ]------------------------------------------------#
message_die(GENERAL_ERROR, "Couldn't insert ban_userid}
##-----[ AFTER, ADD ]-----------------------------------------#
$sql = "UPDATE " . USERS_TABLE . "SET user_warnings=".$board_config['max_user_bancard']."WHERE user_id=".$user_list[$i];
if ( !$db->sql_query($sql) ){
message_die(GENERAL_ERROR, "Couldn't update users warnings info".$sql,"", __LINE__, __FILE__, $sql);
}
##-----[ FIND ]------------------------------------------------#}
if ( isset($HTTP_POST_VARS['unban_ip']) )
#
-
8/15/2019 yellow card 1 4 11em
20/31
#-----[ BEFORE, ADD ]-----------------------------------------#if (! empty($where_sql)){
$sql = "SELECT ban_userid FROM ".BANLIST_TABLE."WHERE ban_id IN ($where_sql)";
if ( !($result = $db->sql_query($sql) )){
message_die(GENERAL_ERROR, "Couldn't get user warnings info fromdatabase".$sql, "", __LINE__, __FILE__, $sql);
}while ($user_id_list = $db->sql_fetchrow($result)){
$where_user_sql .= ( ( $where_user_sql != '' ) ? ', ' : '' ) .$user_id_list['ban_userid'];
}$sql = "UPDATE " . USERS_TABLE . "
SET user_warnings='0'WHERE user_id IN ($where_user_sql)";
if ( !$db->sql_query($sql) ){
message_die(GENERAL_ERROR, "Couldn't update user warnings info fromdatabase".$sql, "", __LINE__, __FILE__, $sql);
}}
##-----[ OPEN ]------------------------------------------------#admin/admin_users.php
##-----[ FIND ]------------------------------------------------
#$user_status = ( !empty($HTTP_POST_VARS['user_status']) )
##-----[ AFTER, ADD ]------------------------------------------#$user_ycard = ( !empty($HTTP_POST_VARS['user_ycard']) ) ? intval($HTTP_POST_VARS['user_ycard'] ) : 0;
##-----[ FIND ]------------------------------------------------#$sql = "UPDATE " . USERS_TABLE . "
##-----[ BEFORE, ADD ]-----------------------------------------#if ($user_ycard>$board_config['max_user_bancard']){
$sql = "SELECT ban_userid FROM " . BANLIST_TABLE . " WHEREban_userid=$user_id";
if( $result = $db->sql_query($sql) ){
if (!$db->sql_fetchrowset($result))
-
8/15/2019 yellow card 1 4 11em
21/31
{// insert the user in the ban list$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid) VALUES
($user_id)";if (!$result = $db->sql_query($sql) )
message_die(GENERAL_ERROR, "Couldn't insert ban_userid info intodatabase", "", __LINE__, __FILE__, $sql);
else $no_error_ban=true;
} else $no_error_ban = true;} else message_die(GENERAL_ERROR, "Couldn't obtain banlist information", "",
__LINE__, __FILE__, $sql);} else{
// remove the ban, if there is any$sql = "DELETE FROM " . BANLIST_TABLE . " WHERE ban_userid=$user_id";if (!$result = $db->sql_query($sql) )
message_die(GENERAL_ERROR, "Couldn't remove ban_userid info into database","", __LINE__, __FILE__, $sql);
else $no_error_ban=true;}
##-----[ FIND ]------------------------------------------------#SET " . $username_sql
##-----[ IN-LINE FIND ]----------------------------------------#$user_status
##-----[ IN-LINE AFTER, ADD ]----------------------------------#
, user_warnings = $user_ycard
##-----[ FIND ]------------------------------------------------#$user_status = $this_userdata['user_active'];
##-----[ AFTER, ADD ]------------------------------------------#$user_ycard = $this_userdata['user_warnings'];
#
#-----[ FIND ]------------------------------------------------#$s_hidden_fields .= '
-
8/15/2019 yellow card 1 4 11em
22/31
#-----[ FIND ]------------------------------------------------#'USER_ACTIVE_NO' =>
##-----[ AFTER, ADD ]------------------------------------------#'BANCARD' => $user_ycard,
##-----[ FIND ]------------------------------------------------#'L_INTERESTS' =>
##-----[ AFTER, ADD ]------------------------------------------#'L_BANCARD' => $lang['ban_card'],'L_BANCARD_EXPLAIN' => sprintf($lang['ban_card_explain'],$board_config['max_user_bancard']),
##-----[ OPEN ]------------------------------------------------#includes/auth.php
##-----[ FIND ]------------------------------------------------#, POLLCREATE
##-----[ AFTER, ADD ]----------------------------------#
BAN, GREENCARD, BLUECARD
##-----[ FIND ]------------------------------------------------#case AUTH_ALL:$a_sql =
##-----[ IN-LINE FIND ]----------------------------------------#';
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#, a.auth_ban, a.auth_greencard, a.auth_bluecard
##-----[ FIND ]------------------------------------------------#$auth_fields =
#
-
8/15/2019 yellow card 1 4 11em
23/31
#-----[ IN-LINE FIND ]----------------------------------------#);
##-----[ IN-LINE BEFORE, ADD ]---------------------------------#
, 'auth_ban', 'auth_greencard', 'auth_bluecard'
##-----[ FIND ]------------------------------------------#default:break;
##-----[ BEFORE, ADD ]------------------------------------------#case AUTH_BAN:
$a_sql = 'a.auth_ban';
$auth_fields = array('auth_ban');break;
case AUTH_GREENCARD:
$a_sql = 'a.auth_greencard';$auth_fields = array('auth_greencard');break;
case AUTH_BLUECARD:$a_sql = 'a.auth_bluecard';$auth_fields = array('auth_bluecard');break;
##-----[ OPEN ]------------------------------------------------#includes/constants.php
##-----[ FIND ]------------------------------------------------#define('PAGE_GROUPCP', -11);
##-----[AFTER, ADD]--------------------------------------------#
define('PAGE_CARD', -12);
##-----[ OPEN ]------------------------------------------------#includes/smtp.php
##-----[ FIND ]------------------------------------------------#// Send the Subject Line...
-
8/15/2019 yellow card 1 4 11em
24/31
fputs($socket, "Subject: $subject\r\n");
// Now the To Header.fputs($socket, "To: $mail_to\r\n");
##-----[ REPLACE WITH ]----------------------------------------#
// Send the Subject Line...if (!eregi ('Subject:',$subject)) fputs($socket, "Subject: $subject\r\n");
// Now the To Header.if (!eregi ('To:',$headers)) fputs($socket, "To: $mail_to\r\n");
##-----[ OPEN ]------------------------------------------------#includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------------#$user_active = 1;$user_actkey = '';
##-----[ REPLACE WITH ]----------------------------------------#$user_active = 'user_active';$user_actkey = 'user_actkey';
##-----[ FIND ]------------------------------------------------
#$sql = "UPDATE " . USERS_TABLE . "SET
##-----[ IN-LINE FIND ]----------------------------------------#user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'
##-----[ IN-LINE REPLACE WITH ]--------------------------------#user_actkey = '$user_actkey'
##-----[ OPEN ]------------------------------------------------#language/lang_english/lang_admin.php
##-----[ FIND ]------------------------------------------------#?>
-
8/15/2019 yellow card 1 4 11em
25/31
##-----[ BEFORE, ADD ]-----------------------------------------#
// Start add - Yellow card admin MOD$lang['Ban'] = 'Ban';$lang['Max_user_bancard'] = 'Maximum number of warnings';$lang['Max_user_bancard_explain'] = 'If a user gets more yellow cards than this
limit, the user will be banned';$lang['ban_card'] = 'Yellow card';$lang['ban_card_explain'] = 'The user will be banned when he/she is in excess of%d yellow cards';$lang['Greencard'] = 'Un-ban';$lang['Bluecard'] = 'Post report';$lang['Bluecard_limit'] = 'Interval of bluecard';$lang['Bluecard_limit_explain'] = 'Notify the moderators again for every xbluecards given to a post';$lang['Bluecard_limit_2'] = 'Limit of bluecard';$lang['Bluecard_limit_2_explain'] = 'First notification to moderators is sent,when a post get this amount of blue cards';$lang['Report_forum']= 'Report forum';
$lang['Report_forum_explain'] = 'Fill with the forum ID where users reports are tobe posted, a value of 0 will disable this feature, users MUST atleast havepost/reply access to this forum';
##-----[ OPEN ]------------------------------------------------#language/lang_english/lang_main.php
##-----[ FIND ]------------------------------------------------#?>
##-----[ BEFORE, ADD ]-----------------------------------------#// Start add - Yellow card admin MOD$lang['Give_G_card']='Re-activate user';$lang['Give_Y_card']='Give user warning #%d';$lang['Give_R_card']='Ban this user now';$lang['Ban_update_sucessful'] = 'The banlist has been updated successfully';$lang['Ban_update_green'] = 'The user is now re-activated';$lang['Ban_update_yellow'] = 'The user has recieved a warning, and has now a totalof %d warnings of a maximum %d warnings';$lang['Ban_update_red'] = 'The user is now banned';
$lang['Ban_reactivate'] = 'Your account has been re-activated';$lang['Ban_warning'] = 'You\'ve recieved a warning';$lang['Ban_blocked'] = 'Your account is now blocked';$lang['Click_return_viewtopic'] = 'Click %sHere%s to return to the topic';$lang['Rules_ban_can'] = 'You can ban other users in this forum';$lang['user_no_email'] = 'The user has no email, therefore no message about thisaction can be sent. You should submit him/her a private message';$lang['user_already_banned'] = 'The selected user is already banned';$lang['Ban_no_admin'] ='This user in an ADMIN and therefore cannot be warned orbanned';$lang['Rules_greencard_can'] = 'You can un-ban users in this forum';
-
8/15/2019 yellow card 1 4 11em
26/31
$lang['Rules_bluecard_can'] = 'You can report post to moderators in thisforum';$lang['Give_b_card'] = 'Report this post to the moderators of this forum';$lang['Clear_b_card'] = 'This post has %d blue cards now. If you press this buttonyou will clear this';$lang['No_moderators'] = 'The forum has no moderators, No reports can be therforesent!';$lang['Post_repported'] = 'This post has now been reported to %d moderators';
$lang['Post_repported_1'] = 'This post has now been reported to the moderator';$lang['Post_repport'] = 'Post Report'; //Subject in email notification$lang['Post_reset'] = 'The blue cards for this post have now been reset';$lang['Search_only_bluecards'] = 'Search only among posts with blue cards';$lang['Send_message'] = 'Click %sHere%s to write a message to the moderators or
';$lang['Send_PM_user'] = 'Click %sHere%s to write a PM to the user or';$lang['Link_to_post'] = 'Click %sHere%s to go to the reported post
--------------------------------
';$lang['Post_a_report'] = 'Post a report';$lang['Report_stored'] = 'Your report has been entered successfully';$lang['Send_report'] = 'Click %sHere%s to go back to the original message';$lang['Red_card_warning'] = 'You are about to give the user:%s a red card, thiswill ban the user, are you sure ?';$lang['Yellow_card_warning'] = 'You are about to give the user:%s a yellow card,this will isue a warning to the user, are you sure ?';$lang['Green_card_warning'] = 'You are about to give the user:%s a green card,this will unban the user, are you sure ?';$lang['Blue_card_warning'] = 'You are about to give the post a blue card, thiswill alert the moderators about this post, Are you sure you want to Alert themoderators about this post ?';$lang['Clear_blue_card_warning'] = 'You are about to reset the blue card counterfor this post, Do you wan to continue ?';$lang['Warnings'] = 'Warnings : %d'; //shown beside users post, if any warningsgiven to the user$lang['Banned'] = 'Currently banned';//shown beside users post, if user are banned
##-----[ OPEN ]------------------------------------------#language/lang_french/lang_main.php
##-----[ FIND ]------------------------------------------#//// That's all, Folks!// -------------------------------------------------
#-----[ BEFORE, ADD ]------------------------------------------#
// Start add - Yellow Card Mod$lang['Give_G_card'] = 'R activer cet utilisateur';$lang['Give_Y_card'] = 'Envoyer un avertissement cet utilisateur: #%d';$lang['Give_R_card'] = 'Bannir cet utilisateur maintenant';$lang['Ban_update_sucessful'] = 'La liste de bannissement a t mise jour avec succ s';$lang['Ban_update_green'] = 'Cet utilasateur a t r activ '; $lang['Ban_update_yellow'] = 'Cet utilsateur a re u un avertissement et a
-
8/15/2019 yellow card 1 4 11em
27/31
maintenant un total de %d avertissement(s) sur un maximum de %d';$lang['Ban_update_red'] = 'Cet utilisateur a t banni'; $lang['Ban_reactivate'] = 'Votre compte a t r activ '; $lang['Ban_warning'] = 'Vous avez re u un avertissement';$lang['Ban_blocked'] = 'Votre compte a t bloqu '; $lang['Click_return_viewtopic'] = 'Cliquez %sici%s pour revenir au sujet';$lang['Rules_ban_can'] = 'Vous pouvez bannir des utilisateurs';$lang['user_no_email'] = 'Cet utilisateur n\'a aucune adresse email, par
cons quent aucun message sur cette action ne peut lui tre envoy . Vous devriez lui envoyer un message priv ';$lang['user_already_banned'] = 'L\'utilisateur s lectionn a d j t banni'; $lang['Ban_no_admin'] = 'Cet utilisateur est l\'administrateur, parcons quent il ne peut pas tre averti ou banni'; $lang['Rules_greencard_can'] = 'Vous pouvez d bannir des utilisateurs';$lang['Rules_bluecard_can'] = 'Vous pouvez rapporter un message auxmod rateurs';$lang['Give_b_card'] = 'Rapporter ce message un mod rateur'; $lang['Clear_b_card'] = 'Ce message a %d rapport(s). Si vous appuyez sur cebouton, vous le remettrez 0';$lang['No_moderators'] = 'Ce forum n\'a aucun mod rateur, par cons quent aucun rapport ne peut tre envoy !';
$lang['Post_repported'] = 'Ce message vient d\' tre rapport %d mod rateurs'; $lang['Post_repported_1'] = 'Ce message vient d\' tre rapport au mod rateur'; $lang['Post_repport'] = 'Rapport'; //Subject in email notification$lang['Post_reset'] = 'Les rapports pour ce message ont t r initialis s'; $lang['Search_only_bluecards'] = 'Rechercher uniquement parmi les messages ayantdes rapports';$lang['Send_message'] = 'Cliquez %sici%s pour crire un message aux mod rateurs ou
';$lang['Send_PM_user'] = 'Cliquez %sici%s pour crire un MP cet utilisateur ou'; $lang['Link_to_post'] = 'Cliquez %sici%s pour aller au message rapport --------------------------------
';$lang['Post_a_report'] = 'Rapport';$lang['Report_stored'] = 'Votre rapport a t envoy avec succ s';$lang['Send_report'] = 'Cliquez %sici%s pour revenir au message original';$lang['Red_card_warning'] = "Vous tes sur le point d\'envoyer un carton rouge %s, ceci bannira d finitivement l\'utilisateur. Etes-vous s r ?"; $lang['Yellow_card_warning'] = "Vous tes sur le point d\'envoyer un carton jaune %s , ceci avertira l\'utilisateur. Etes-vous s r ?";
$lang['Green_card_warning'] = "Vous tes sur le point d\'envoyer un carton vert %s, ceci d bannira l\'utilisateur. Etes-vous s r ?"; $lang['Blue_card_warning'] = 'Vous tes sur le point de transmettre un rapport sur ce message, ceci avertira les mod rateurs sur la pr sence de ce message. Etes-vous s r de vouloir avertir les mod rateurs de la pr sence de ce message ?'; $lang['Clear_blue_card_warning'] = 'Vous tes sur le point de r initialiser le compteur de rapports pour ce message. Souhaitez-vous continuez ?';$lang['Warnings'] = 'Averti: %d fois'; //shown beside users post, if any warnings
given to the user$lang['Banned'] = 'Actuellement banni'; //shown beside users post, if user arebanned// End add - Yellow Card Mod
##-----[ OPEN ]------------------------------------------#language/lang_french/lang_admin.php
#
-
8/15/2019 yellow card 1 4 11em
28/31
#-----[ FIND ]------------------------------------------#//// That's all Folks!// -------------------------------------------------##-----[ BEFORE, ADD ]------------------------------------------#
// Start add - Yellow Card Mod$lang['Ban'] = 'Bannir';$lang['Max_user_bancard'] = 'Nombre maximum d\'avertissements';$lang['Max_user_bancard_explain'] = 'Si un utilisateur d passe la limite des avertissements (cartons jaunes), il sera banni';$lang['ban_card'] = 'Avertissement';$lang['ban_card_explain'] = 'L\'utilisateur sera banni lorsqu\'il d passera la limite de %d avertissements';$lang['Greencard'] = 'D bannir';$lang['Bluecard'] = 'Rapporter';$lang['Bluecard_limit'] = 'Intervalle des rapports';$lang['Bluecard_limit_explain'] = 'Informer les mod rateurs tous les X rapports
envoy s un message'; $lang['Bluecard_limit_2'] = 'Limite des rapports';$lang['Bluecard_limit_2_explain'] = 'La premi re notification aux mod rateurs est envoy e lorsqu\'un message obtient ce nombre de rapports';$lang['Report_forum']= 'Rapporter un forum';$lang['Report_forum_explain'] = 'ID du forum o les utilisateurs posteront les rapports, une valeur de 0 d sactivera cette option. Les utilisateurs DOIVENT au moins avoir les droits pour poster/r pondre dans ce forum';// End add - Yellow Card Mod
##-----[ OPEN ]------------------------------------------------#
templates/subSilver/posting_body.tpl
##-----[ FIND ]------------------------------------------------#value="{SUBJECT}"
##-----[ IN-LINE FIND ]----------------------------------------#type="text"
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------#{S_LOCK_SUBJECT}
##-----[ OPEN ]------------------------------------------------#templates/subSilver/search_body.tpl
##-----[ FIND ]------------------------------------------------
-
8/15/2019 yellow card 1 4 11em
29/31
#{L_SEARCH_ALL_TERMS}
##-----[ IN-LINE FIND ]----------------------------------------#{L_SEARCH_ALL_TERMS}
##-----[ IN-LINE AFTER, ADD]-----------------------------------#{L_ONLY_BLUECARDS}
##-----[ OPEN ]------------------------------------------------#templates/subSilver/subSilver.cfg
##-----[ FIND ]------------------------------------------------#
$board_config['privmsg_graphic_length'] =
##-----[ AFTER, ADD ]------------------------------------------#
// Start add - Yellow card admin MOD$images['icon_g_card'] = "$current_template_images/icon_gcard.gif";$images['icon_y_card'] = "$current_template_images/icon_ycard.gif";$images['icon_r_card'] = "$current_template_images/icon_rcard.gif";$images['icon_b_card'] = "$current_template_images/icon_bcard.gif";$images['icon_bhot_card'] = "$current_template_images/icon_bhotcard.gif";
##-----[ OPEN ]------------------------------------------------#templates/subSilver/viewtopic_body.tpl
##-----[ FIND ]------------------------------------------------#{postrow.POSTER_NAME}
##-----[ IN-LINE FIND ]------------------------------------------------#
{postrow.POSTER_NAME}
##-----[ IN-LINE AFTER, ADD]-------------------------------------------#
{postrow.CARD_IMG}##-----[ FIND ]------------------------------------------------#{postrow.U_MINI_POST}
-
8/15/2019 yellow card 1 4 11em
30/31
##-----[ BEFORE, ADD]------------------------------------------#
##-----[ FIND ]------------------------------------------------#{postrow.IP_IMG}
##-----[ IN-LINE FIND ]----------------------------------------#{postrow.IP_IMG}
##-----[ IN-LINE AFTER, ADD]-----------------------------------
#{postrow.U_R_CARD}{postrow.U_Y_CARD}{postrow.U_G_CARD}{postrow.U_B_CARD}{postrow.CARD_EXTRA_SPACE}{postrow.CARD_HIDDEN_FIELDS}
##-----[ AFTER, ADD]-------------------------------------------#
#
#-----[ OPEN ]------------------------------------------------#templates/subSilver/admin/board_config_body.tpl
##-----[ FIND ]------------------------------------------------#{PRUNE_YES}
##-----[ AFTER, ADD ]------------------------------------------#
{L_BLUECARD_LIMIT_2}
{L_BLUECARD_LIMIT_2_EXPLAIN}{L_BLUECARD_LIMIT}
{L_BLUECARD_LIMIT_EXPLAIN} -
8/15/2019 yellow card 1 4 11em
31/31
name="bluecard_limit" value="{BLUECARD_LIMIT}" />
{L_MAX_USER_BANCARD}
{L_MAX_USER_BANCARD_EXPLAIN}{L_REPORT_FORUM}
{L_REPORT_FORUM_EXPLAIN}{S_REPORT_FORUM}##-----[ OPEN ]------------------------------------------------#templates/subSilver/admin/user_edit_body.tpl
##-----[ FIND ]------------------------------------------------
#{L_DELETE_USER_EXPLAIN}
##-----[ AFTER, ADD ]------------------------------------------#
{L_BANCARD}:
{L_BANCARD_EXPLAIN}##-----[ SAVE/CLOSE ALL FILES ]--------------------------------##EoM
top related