Doch ich erhalte 1 Notiz und 2 Warnungen:
[ NOTICE ] You are not using the GPL License. Please be aware that most MODs are automatically licensed under the GPL and you may be required to relicense your MOD in accordance with the terms of the GPL inherited from the core phpBB package.
[ WARNING ] Files To Edit in header does not equal files edited in MOD
[ WARNING ] Included Files in header does not equal filed copied over in MOD
Hier meine Anleitung:
Code: Alles auswählen
##############################################################
## MOD Title: Penalty Points
## MOD Author: Area51 < support@scripting-base.de > (Andreas Fernandez) http://www.scripting-base.de
## MOD Description: This modification makes possible give any user penalty
## points. If count of points is higher then a setted maximum
## value, the user will locked automatically.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 10min
## Files To Edit: 7
## includes/page_header.php
## language/lang_english/lang_main.php
## language/lang_german/lang_admin.php
## language/lang_german/lang_main.php
## languages/lang_english/lang_admin.php
## templates/subSilver/viewtopic_body.tpl
## viewtopic.php
## Included Files: 5
## db_update.php
## admin/admin_penalty.php
## admin/admin_penalty_list.php
## templates/subSilver/admin/penalty_config_body.tpl
## templates/subSilver/admin/penalty_users_body.tpl
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v3
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## upload 'db_update.php', run it and remove it then
##
## Version for phpBB2
##
##############################################################
## MOD History:
##
## 2007-12-10 - Version 1.0.0
## - first public release
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
copy db_update.pho to db_update.php
copy admin/admin_penalty.php to admin/admin_penalty.php
copy admin/admin_penalty_list.php to admin/admin_penalty_list.php
copy templates/subSilver/admin/penalty_config_body.tpl to templates/subSilver/admin/penalty_config_body.tpl
copy templates/subSilver/admin/penalty_userlist_body.tpl to templates/subSilver/admin/penalty_userlist_body.tpl
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
# original line is longer
u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, u.user_allowsmile
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, u.user_penalty
#
#-----[ FIND ]------------------------------------------
#
$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&sid=" . $userdata['session_id'];
$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// PenaltyPoints
$ppoints = $lang['Penalty_countpoints'] . round($userdata['user_penalty']);
// PenaltyPoints
#
#-----[ FIND ]------------------------------------------
#
else
{
$ip_img = '';
$ip = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Is this a post of reading user?
if ( $userdata['user_id'] == $poster_id )
{
$ppoints = $lang['Penalty_countpoints'] . round($userdata['user_penalty']);
}
else
{
$ppoints = '';
}
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'POSTER_NAME' => $poster,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POSTER_PENALTY' => $ppoints,
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// Viewtopic
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Penalty-Points
//
$lang['Penalty_countpoints'] = 'Penalty points: ';
//
// Penalty-Points
//
#
#-----[ OPEN ]------------------------------------------
#
languages/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Styles'] = 'Styles Admin';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Penalty'] = 'Penalty Points';
#
#-----[ FIND ]------------------------------------------
#
$lang['Backup_DB'] = 'Backup Database';
$lang['Restore_DB'] = 'Restore Database';
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Penalty Points
//
$lang['Click_return_penalty'] = 'Click %shier%s, to return to the Penaltypoints-settings';
$lang['Penalty_Config'] = 'Penalty Points: Settings';
$lang['Penalty_Explain_Config'] = 'Here you can change all settigs round the Penalty Points-modification.';
$lang['Penalty_Userlist'] = 'Penalty Points: Memberlist';
$lang['Penalty_User'] = 'Member';
$lang['Penalty_User_Points'] = 'Points';
$lang['Penalty_Explain_Userlist'] = 'In this list are showed all members.';
$lang['Penaltyconfig'] = 'Settings';
$lang['Penaltylist'] = 'Penaltylist';
$lang['Penalty_description'] = 'On the right side, you can set the highest number of points.<br /><b>Is a member above this number, he\'ll banned!</b>';
//
// Penalty Points
//
#
#-----[ OPEN ]------------------------------------------
#
language/lang_german/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// Viewtopic
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Penalty-Points
//
$lang['Penalty_countpoints'] = 'Strafpunkte: ';
//
// Penalty-Points
//
#
#-----[ OPEN ]------------------------------------------
#
language/lang_german/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Styles'] = 'Styles/Themes';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Penalty'] = 'Strafpunkte';
#
#-----[ FIND ]------------------------------------------
#
$lang['Backup_DB'] = 'Datenbank-Backup';
$lang['Restore_DB'] = 'Datenbank wiederherstellen';
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Penalty Points
//
$lang['Click_return_penalty'] = 'Klicke %shier%s, um zu den Strafpunkte-Einstellungen zurückzukehren';
$lang['Penalty_Config'] = 'Strafpunkte: Einstellungen';
$lang['Penalty_Explain_Config'] = 'Hier kannst Du alle Einstellungen vornehmen, die die Strafpunktemod betreffen.';
$lang['Penalty_Userlist'] = 'Strafpunkte: Userliste';
$lang['Penalty_User'] = 'Benutzer';
$lang['Penalty_User_Points'] = 'Strafpunkte';
$lang['Penalty_Explain_Userlist'] = 'In diesem Bereich werden alle Benutzer aufgelistet.';
$lang['Penaltyconfig'] = 'Einstellungen';
$lang['Penaltylist'] = 'Strafliste';
$lang['Penalty_description'] = 'Nebenan kannst Du die Höchstzahl der zulässigen Strafpunkte festlegen.<br /><b>Liegt dann ein User über dieser Zahl, wird er gesperrt!</b>';
//
// Penalty Points
//
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
//
// Parse and show the overall header.
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Penalty Points
//
$penalty_timestamp = time() - $userdata['user_penalty_timestamp'];
if( $userdata['user_penalty'] > 0 )
{
if( $penalty_timestamp >= 2592000 )
{
$sql = "UPDATE
" . USERS_TABLE . "
SET
user_penalty = user_penalty -1,
user_penalty_timestamp = " . time() . "
WHERE
user_id = " .$userdata['user_id'];
if( !$result = $db -> sql_query( $sql ) )
{
message_die(GENERAL_ERROR, 'Could not update user penalty', '', __LINE__, __FILE__, $sql);
}
}
}
//
// Penalty Points
//
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{postrow.POSTER_FROM}
#
#-----[ AFTER, ADD ]------------------------------------------
#
<br />{postrow.POSTER_PENALTY}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Zeile zur GNU GPL ist vorhanden (unter der Included-Files-Liste)
Zu WARNING1:
Die Anzahl der zu bearbeiteten Daten stimmt (sowohl auch die Zahl, als auch die [OPEN]s)
Zu WARNING2:
Die Anzahl der eingebundenen Dateien stimmt auch (in der Liste 5, im [COPY]-Abschnitt 5)
Interpretiere ich die Meldungen falsch, oder liegt der Fehler beim Validator?