Varnings system

Frågor kring MODdar (modifikationer) för phpBB 2.0.x.

Moderatorer: Supportgrupp, Moderatorgrupp

Ara
Ny medlem
Ny medlem
Inlägg: 4
Blev medlem: 2005-11-14 23:20
Svar: 0

Varnings system

Inlägg av Ara »

Hej hej.

Jag undrar om det finns ett varnings system till phpbb 2,18.

Menar en warnings bar under användarens avatar där admin/moderator kan varna en medlemm.


Tack på förhand
Ara
Ny medlem
Ny medlem
Inlägg: 4
Blev medlem: 2005-11-14 23:20
Svar: 0

Inlägg av Ara »

efter en del sökningar i forumet så hittade jag yellow card. Får testa detta system om ni inte rekomenderar något annat.
Användarens profilbild
Holger
Support - Ledare
Support - Ledare
Inlägg: 6561
Blev medlem: 2004-06-09 09:32
Svar: 1

Inlägg av Holger »

Det finns nog bara det systemet, prova och återkom om du fastnar!
Holger Gremminger
Ingen support via PM!
Ara
Ny medlem
Ny medlem
Inlägg: 4
Blev medlem: 2005-11-14 23:20
Svar: 0

Inlägg av Ara »

dum fråga kanske men är det bara att slänga in det i roten?
Användarens profilbild
Holger
Support - Ledare
Support - Ledare
Inlägg: 6561
Blev medlem: 2004-06-09 09:32
Svar: 1

Inlägg av Holger »

Jag vet inte, lägg upp installations-anvisningen här ...
Holger Gremminger
Ingen support via PM!
Ara
Ny medlem
Ny medlem
Inlägg: 4
Blev medlem: 2005-11-14 23:20
Svar: 0

Inlägg av Ara »

##############################################################
## MOD Title: Yellow card cat hierachy
## 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 colored buttons beside users post (red,yellow,green and blue)
## ADMIN can in ACP configure inside witch forum the buttons are visible
## Red = ban, Yelow = warn, Green = unban, Blue = report to moderators
## Emails are send to the user, notifying about the event.
##
## MOD Version: 1.5.0.
## Compatibility: 2.0.6
##
## Installation Level: Moderate
## Installation Time: 40 minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit: 4
## index.php
## viewtopic.php
## search.php
## inlcudes/auth.php
## includes/constants.php
## admin/admin_board.php
## admin/admin_users.php
## admin/admin_user_ban.php
## language/lang_english/lang_admin.php
## language/lang_english/lang_main.php
## language/lang_english/lang_extended_admin.php
## 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
## 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 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/
##############################################################
## 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:
##
## 2005-03-22 - version 1.5.0
## - addaption of existing mod, to comply with catherachy mod
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This 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.php
execute yellow_card_db_update.php
delete yellow_card_db_update.php

#
#-----[ COPY ]------------------------------------------------
#
root/card.php to card.php
root/language/lang_english/email/ban_block.tpl to language/lang_english/email/
root/language/lang_english/email/ban_reactivated.tpl to language/lang_english/email/
root/language/lang_english/email/ban_warning.tpl to language/lang_english/email/
root/language/lang_english/email/repport_post.tpl to language/lang_english/email/
root/templates/subSilver/images/icon_bcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_bhotcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_gcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_rcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_ycard.gif to templates/subSilver/images/

#
#-----[ OPEN ]------------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------------
#
$s_auth_can .= ($user->auth(POST_FORUM_URL,


#
#-----[ BEFORE, ADD ]------------------------------------------
#
$s_auth_can .= $user->auth(POST_FORUM_URL, 'auth_redcard', $forum_id) ? $user->lang('Rules_redcard_can'). '<br />' : '';
$s_auth_can .= $user->auth(POST_FORUM_URL, 'auth_yellowcard', $forum_id) ? $user->lang('Rules_yellowcard_can'). '<br />' : '';
$s_auth_can .= $user->auth(POST_FORUM_URL, 'auth_greencard', $forum_id) ? $user->lang('Rules_greencard_can'). '<br />' : '';
$s_auth_can .= $user->auth(POST_FORUM_URL, 'auth_bluecard', $forum_id) ? $user->lang('Rules_bluecard_can'). '<br />' : '';

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


#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT u.username

#
#-----[ IN-LINE FIND ]----------------------------------------
#
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_redcard'] ) ? $lang['Rules_redcard_can'] . '<br />' : '';
$s_auth_can .= ( $is_auth['auth_yellowcard'] ) ? $lang['Rules_yellowcard_can'] . '<br />' : '';
$s_auth_can .= ( $is_auth['auth_greencard'] ) ? $lang['Rules_greencard_can'] . '<br />' : '';
$s_auth_can .= ( $is_auth['auth_bluecard'] ) ? $lang['Rules_bluecard_can'] . '<br />' : '';


#
#-----[ 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 = ' <input type="image" name="unban" value="unban" onClick="return confirm(\''.sprintf($lang['Green_card_warning'],$current_user).'\')" src="'. $images['icon_g_card'] . '" alt="' . $lang['Give_G_card'] . '" >';
}
else
{
$g_card_img = '';
}
$user_warnings = $postrow[$i]['user_warnings'];
$card_img = ($user_warnings) ? (( $user_warnings < $board_config['max_user_bancard']) ? sprintf($lang['Warnings'], $user_warnings) : $lang['Banned'] ) : '';
// these lines will make a icon apear beside users post, if user have warnings or ar banned
// used instead of the previous line of code, witch shows the status as a text
// ------ From here --- do not include this line
// $card_img = ($user_warnings) ? '<img src="'.(( $user_warnings < $board_config['max_user_bancard']) ?
// $images['icon_y_card'] . '" alt="'. sprintf($lang['Warnings'], $user_warnings) .'">' :
// $images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">') : '';
// ----- To this line --- Do not included this line
//
// You may also included several images, instead of only one yellow, these lines below will produce several yellow images, depending on mumber of yellow cards
// ------ From here --- do not include this line
//$card_img = ($user_warnings >= $board_config['max_user_bancard']) ? '<img src="'.$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">' : '';
//for ($n=0 ; $n<$user_warnings && $user_warnings < $board_config['max_user_bancard'];$n++)
//{
//$card_img .= ($user_warnings) ? '<img src="'.(( $user_warnings < $board_config['max_user_bancard']) ?
//$images['icon_y_card'] . '" alt="'. sprintf($lang['Warnings'], $user_warnings) .'">' :
//$images['icon_r_card'] . '" alt="'. $lang['Banned'] .'">') : '';
//}
// ----- To this line --- Do not included this line

if ($user_warnings<$board_config['max_user_bancard'] )
{
if ($is_auth['auth_redcard'] )
{
$r_card_img = ' <input type="image" name="ban" value="ban" onClick="return confirm(\''.sprintf($lang['Red_card_warning'],$current_user).'\')" src="'. $images['icon_r_card'] . '" alt="' . $lang['Give_R_card'] . '" >';
} else
{
$r_card_img = '';
}
if ($is_auth['auth_yellowcard'] )
{
if ($user_warnings == $board_config['max_user_bancard'] && !$is_auth['auth_redcard'])
{
$y_card_img = '';
} else
{
$y_card_img = ' <input type="image" name="warn" value="warn" onClick="return confirm(\''.sprintf($lang['Yellow_card_warning'],$current_user).'\')" src="'. $images['icon_y_card'] . '" alt="' . sprintf($lang['Give_Y_card'],$user_warnings+1) . '" >';
}
} else
{
$y_card_img = '';
}
}
else
{
$y_card_img = '';
$r_card_img = '';
}

} else
{
$card_img = '';
$g_card_img = '';
$y_card_img = '';
$r_card_img = '';
}

if ($is_auth['auth_bluecard'])
{
if ($is_auth['auth_mod'])
{
$b_card_img = (($postrow[$i]['post_bluecard'])) ? ' <input type="image" name="report_reset" value="report_reset" onClick="return confirm(\''.$lang['Clear_blue_card_warning'].'\')" src="'. $images['icon_bhot_card'] . '" alt="'. sprintf($lang['Clear_b_card'],$postrow[$i]['post_bluecard']) . '">':' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >';
}
else
{
$b_card_img = ' <input type="image" name="report" value="report" onClick="return confirm(\''.$lang['Blue_card_warning'].'\')" src="'. $images['icon_b_card'] . '" alt="'. $lang['Give_b_card'] . '" >';

}
} else $b_card_img = '';

// parse hidden filds if cards visible
$card_hidden = ($g_card_img || $r_card_img || $y_card_img || $b_card_img) ? '<input type="hidden" name="post_id" value="'. $postrow[$i]['post_id'].'">' :'';

#
#-----[ 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 ]------------------------------------------------
#
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_id
FROM

#
#-----[ BEFORE, ADD ]-----------------------------------------
#
$search_msg_only .= ($only_bluecards) ? " AND p.post_bluecard>0 AND m.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 AND pt.post_id=p.post_id " : "";
$sql = "SELECT pt.post_id
FROM " . 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) ? '</br><input type="checkbox" name="only_bluecards" > '.$lang['Search_only_bluecards'] :'';


#
#-----[ FIND ]------------------------------------------------
#
'L_TOPICS' =>
'L_POSTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_ONLY_BLUECARDS' => $l_only_bluecards,



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

#
#-----[ FIND ]------------------------------------------------
#
//-- fin mod : categories hierarchy --------------------------------------------
$auth_fields = array(

#
#-----[ IN-LINE, FIND ]------------------------------------------------
#
, 'auth_pollcreate'

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, 'auth_redcard', 'auth_yellowcard', 'auth_greencard', 'auth_bluecard'


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

#
#-----[ FIND ]------------------------------------------------
#
define('PAGE_GROUPCP', -11);

#
#-----[AFTER, ADD]--------------------------------------------
#
define('PAGE_CARD', -12);


define('AUTH_ATTACH', 11);


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

#
#-----[ 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'],
'REPORT_FORUM' => $new['report_forum'],


#
#-----[ 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']) )

#
#-----[ 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 from database".$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 from database".$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 . " WHERE ban_userid=$user_id";
if( $result = $db->sql_query($sql) )
{
if (!$db->sql_fetchrowset($result))
{
// 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 into database", "", __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 .= '<input type="hidden" name="user_status"

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

#
#-----[ 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 ]------------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Yellow card MOD
$lang['ban_card'] = 'Yellow card';
$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_explain'] = 'The user will be banned when he/she is in excess of %d yellow cards';
$lang['Bluecard_limit'] = 'Interval of bluecard';
$lang['Bluecard_limit_explain'] = 'Notify the moderators again for every x bluecards 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 to be posted, a value of 0 will disable this feature, users MUST atleast have post/reply access to this forum';

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

#
#-----[ FIND ]------------------------------------------------
#
$lang['auth_global_announce'] = 'Create global announces';


#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Yellow card admin MOD
$lang['auth_bluecard'] = 'Post report';
$lang['auth_greencard'] = 'May Un-ban other users';
$lang['auth_yellowcard'] = 'May warn other users';
$lang['auth_redcard'] = 'May ban other users';
// End add - Yellow card admin MOD


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

#
#-----[ FIND ]------------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Yellow card MOD
$lang['Rules_redcard_can'] = 'You <b>can</b> ban other users in this forum';
$lang['Rules_yellowcard_can'] = 'You <b>can</b> warn other users in this forum';
$lang['Rules_greencard_can'] = 'You <b>can</b> un-ban users in this forum';
$lang['Rules_bluecard_can'] = 'You <b>can</b> report post to moderators in this forum';
$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 total of %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['user_no_email'] = 'The user has no email, therefore no message about this action 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 or banned';
$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 button you will clear this';
$lang['No_moderators'] = 'The forum has no moderators, No reports can be therfore sent!';
$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 <br />';
$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 <br/>--------------------------------<br/><br/>';
$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, this will 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, this will alert the moderators about this post, Are you sure you want to Alert the moderators about this post ?';
$lang['Clear_blue_card_warning'] = 'You are about to reset the blue card counter for this post, Do you wan to continue ?';
$lang['Warnings'] = 'Warnings : %d'; //shown beside users post, if any warnings given to the user
$lang['Banned'] = 'Currently banned';//shown beside users post, if user are banned

#
#-----[ 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}</b>

#
#-----[ IN-LINE FIND ]------------------------------------------------
#
{postrow.POSTER_NAME}</b>

#
#-----[ IN-LINE AFTER, ADD]-------------------------------------------
#
<br />{postrow.CARD_IMG}

#
#-----[ FIND ]------------------------------------------------
#
{postrow.IP_IMG}

#
#-----[ IN-LINE FIND ]----------------------------------------
#
{postrow.IP_IMG}

#
#-----[ IN-LINE AFTER, ADD]-----------------------------------
#
<form method="post" action="{postrow.S_CARD}">
{postrow.U_R_CARD}{postrow.U_Y_CARD}{postrow.U_G_CARD}{postrow.U_B_CARD}{postrow.CARD_EXTRA_SPACE}{postrow.CARD_HIDDEN_FIELDS}
</form>


#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/search_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
{L_SEARCH_ALL_TERMS}

#
#-----[ IN-LINE FIND ]----------------------------------------
#
{L_SEARCH_ALL_TERMS}

#
#-----[ IN-LINE AFTER, ADD]-----------------------------------
#
{L_ONLY_BLUECARDS}


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

#
#-----[ FIND ]------------------------------------------------
#
{PRUNE_YES}
</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<tr>
<td class="row1">{L_BLUECARD_LIMIT_2}<br /><span class="gensmall">{L_BLUECARD_LIMIT_2_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="bluecard_limit_2" value="{BLUECARD_LIMIT_2}" /></td>
</tr>
<tr>
<td class="row1">{L_BLUECARD_LIMIT}<br /><span class="gensmall">{L_BLUECARD_LIMIT_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="bluecard_limit" value="{BLUECARD_LIMIT}" /></td>
</tr>
<tr>
<td class="row1">{L_MAX_USER_BANCARD}<br /><span class="gensmall">{L_MAX_USER_BANCARD_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="max_user_bancard" value="{MAX_USER_BANCARD}" /></td>
</tr>
<tr>
<td class="row1">{L_REPORT_FORUM}<br /><span class="gensmall">{L_REPORT_FORUM_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="report_forum" value="{REPORT_FORUM}" /></td>
</tr>

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

#
#-----[ FIND ]------------------------------------------------
#
{L_DELETE_USER_EXPLAIN}
</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<tr>
<td class="row1"><span class="gen">{L_BANCARD}:</span><br /><span class="gensmall">{L_BANCARD_EXPLAIN}<br /></td>
<td class="row2"><input type="text" class="post" style="width: 40px" name="user_ycard" size="4" maxlength="4" value="{BANCARD}" /></td>
</tr>

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
#EoM








Är ny på detta så jag hänger inte med alls
Användarens profilbild
Holger
Support - Ledare
Support - Ledare
Inlägg: 6561
Blev medlem: 2004-06-09 09:32
Svar: 1

Inlägg av Holger »

Ok, börja att följa instruktionerna som börjar här:
#-----[ 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.php
execute yellow_card_db_update.php
delete yellow_card_db_update.php

#
#-----[ COPY ]------------------------------------------------
#
root/card.php to card.php
root/language/lang_english/email/ban_block.tpl to language/lang_english/email/
root/language/lang_english/email/ban_reactivated.tpl to language/lang_english/email/
root/language/lang_english/email/ban_warning.tpl to language/lang_english/email/
root/language/lang_english/email/repport_post.tpl to language/lang_english/email/
root/templates/subSilver/images/icon_bcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_bhotcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_gcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_rcard.gif to templates/subSilver/images/
root/templates/subSilver/images/icon_ycard.gif to templates/subSilver/images/
Anvisningen i SQL betyder att du skall kopiera filen yellow_card_db_update.php till rooten och sedan utföra och därefter radera den.

Och fortsätt sedan med det som kommer därefter.
Holger Gremminger
Ingen support via PM!
Skriv svar

Vilka är online

Användare som besöker denna kategori: 2 och 0 gäster