Sopt Post Count klappt nicht
Verfasst: 29.01.2003 14:33
Habe diesen Mod hier:
Gibt es vielleicht einen anderen? Oder sind hier Fehler bekannt?
Ciao S.
Code: Alles auswählen
#################################################################
## Mod Title: Stop Posts Count From Increasing
## Mod Version: 1.0.0
## Author: ssjslim < ssjslim@yahoo.com > - http://bbmod.sourceforge.net
## Description: Stop a user's posts count from increasing when they post in a certain forum.
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: functions_post.php, admin_board.php, board_config_body.tpl, lang_main.php
## Included Files: mod_install.php, mod_uninstall.php
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
## You should change all your languages and themes if you use others
## then English and subSilver.
#################################################################
##
## Installation
##
## 1) Upload all files to their respective location in this format.
##
## /mod_install.php (Only needed for install)
## /mod_uninstall.php (Only needed for uninstall)
##
## 2) Run mod_install.php from your web broswer to make the table changes.
## 3) Read below to make the rest of the changes.
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
if ( $topic_update_sql != '' )
{
$sql = "UPDATE " . TOPICS_TABLE . " SET
$topic_update_sql
WHERE topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ AFTER, ADD ]----------------------------------
#
$board_config['no_post_count_forum_id'] = $GLOBALS['board_config']['no_post_count_forum_id'];
if( strstr($board_config['no_post_count_forum_id'], ',') )
{
$fids = explode(',', $board_config['no_post_count_forum_id']);
while( list($foo, $id) = each($fids) )
{
$fid[] = intval( trim($id) );
}
}
else
{
$fid[] = intval( trim($board_config['no_post_count_forum_id']) );
}
reset($fid);
#
#-----[ FIND ]------------------------------------------
#
if ( $mode != 'poll_delete' )
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $mode != 'poll_delete' && in_array($forum_id, $fid) == false )
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
"L_RESET" => $lang['Reset'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'NO_POST_COUNT_FORUM_ID' => $new['no_post_count_forum_id'],
'NO_POST_COUNT' => $lang['no_post_count'],
'NO_POST_COUNT_EXPLAIN' =>$lang['no_post_count_explain'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_MAX_POLL_OPTIONS}</td>
<td class="row2"><input type="text" name="max_poll_options" size="4" maxlength="4" value="{MAX_POLL_OPTIONS}" /></td>
</tr>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<tr>
<td class="row1">{NO_POST_COUNT}<br /><span class="gensmall">{NO_POST_COUNT_EXPLAIN}</span></td>
<td class="row2"><input type="text" name="no_post_count_forum_id" maxlength="255" value="{NO_POST_COUNT_FORUM_ID}" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['A_critical_error'] = "A Critical Error Occurred";
#
#-----[ AFTER, ADD ]------------------------------------------
#
//No Post Count MOD
$lang['no_post_count'] = "No post count in forum";
$lang['no_post_count_explain'] = "Forum IDs of forums you don't want users post to increase. Separate multiple forum IDs with commas";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Ciao S.