Szukam takiego czegoś, co sprawi, że na sub forum, pisane posty nie będą nabijały licznika postów. Czyli "nie będą się liczyły".
Chyba, że to się gdzieś w ustawieniach robi... ?
Proszę, pomóżcie. Z góry dzięki
Kod: Zaznacz cały
##############################################################
## MOD Title: Disable Post Count Increase
## MOD Author: Xore < xore@azuriah.com > (Robert Hetzler) http://www.azuriah.com
## MOD Translation: Merkury < forumd2@o2.pl > Member of Polish Translation Group
## MOD Description: This mod enables you to selectively turn off post count increments on each forum
## MOD Version: 1.0.1
##
## Installation Level: (Easy)
## Installation Time: 2 Minutes
## Files To Edit: includes/functions_post.php,
## admin/admin_forums.php
## language/lang_english/lang_admin.php
## templates/subSilver/admin/forum_edit_body.tpl
## Included Files: (n/a)
##############################################################
## 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:
##
##############################################################
## MOD History:
##
## 2003-09-21 - Version 1.0.0
## - Initial release
## 2003-09-23 - Version 1.0.1
## - Comma error fixed, fixed "Files To Edit"
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
# Change the prefix 'phpbb_' accordingly. 'phpbb_' is the default prefix
#
ALTER TABLE phpbb_forums ADD forum_postcount TINYINT( 1 ) DEFAULT '1' NOT NULL;
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$sql = "SELECT forum_postcount
FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id AND forum_postcount = 0";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result))
{
return;
}
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_forums.php
#
#-----[ FIND ]------------------------------------------
#
'S_PRUNE_ENABLED' => $prune_enabled,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'S_FORUM_POSTCOUNT' => ( isset($row) && isset($row['forum_postcount']) && ($row['forum_postcount'] == 0) ) ? '' : 'checked="checked"',
#
#-----[ FIND ]------------------------------------------
#
'L_DAYS' => $lang['Days'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_POSTCOUNT' => $lang['Forum_postcount'],
#
#-----[ FIND ]------------------------------------------
#
prune_enable" . $field_sql
#
#-----[ IN-LINE FIND ]------------------------------------------
#
prune_enable
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# (before the " )
#
, forum_postcount
#
#-----[ FIND ]------------------------------------------
#
intval($HTTP_POST_VARS['prune_enable']) . $value_sql
#
#-----[ IN-LINE FIND ]------------------------------------------
#
intval($HTTP_POST_VARS['prune_enable'])
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# (before the . )
#
. ", " . intval($HTTP_POST_VARS['forum_postcount'])
#
#-----[ FIND ]------------------------------------------
#
prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
#
#-----[ AFTER, ADD ]------------------------------------------
#
, forum_postcount = " . intval($HTTP_POST_VARS['forum_postcount']) . "
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['prune_freq']
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Forum_postcount'] = 'Count user\'s posts';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_polish/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['prune_freq']
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Forum_postcount'] = 'Zliczaj posty użytkowników';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/forum_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="catBottom" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{S_SUBMIT_VALUE}" class="mainoption" /></td>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_POSTCOUNT}</td>
<td class="row2">{L_ENABLED}<input type="checkbox" name="forum_postcount" value="1" {S_FORUM_POSTCOUNT} /></td>
</tr>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Kod: Zaznacz cały
mysql_query(ALTER TABLE phpbb_forums ADD forum_postcount TINYINT( 1 ) DEFAULT '1' NOT NULL; );
generator istniejeLord pisze:Ok, dzieki chłopaki, ale jest taki problem, ze nie mam PhpMyAdmina i nie moge zapdejtować bazy. Zawsze robiłem to na tej stronce (przed rewolucją), był tu taki Database generator, czy jakoś tak. jest jeszcze coś takiego tutaj?? I jak to zrobić?
Kod: Zaznacz cały
<?php
/***************************************************************************
* db_update.php
* -------------------
*
* copyright : Š2003 Freakin' Booty ;-P & Antony Bailey
* project : http://sourceforge.net/projects/dbgenerator
* Website : http://freakingbooty.no-ip.com/ & http://www.rapiddr3am.net
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("login.$phpEx?redirect=db_update.$phpEx", true));
exit;
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}
$page_title = 'Updating the database';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';
$sql = array();
$sql[] = "ALTER TABLE " . $table_prefix . "forums ADD forum_postcount TINYINT( 1 ) DEFAULT '1' NOT NULL";
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Error:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
}
}
echo '</ul></span></td></tr><tr><td class="catBottom" height="28"> </td></tr>';
echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.<br />If you have run into any errors, please visit the <a href="http://www.phpbbsupport.co.uk" target="_phpbbsupport">phpBBSupport.co.uk</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>Oczywiście, że jest i znajdziesz to dokładnie TutajSan pisze:chodzi mi o coś co będzie zerowało licznik wszystkim użytkownikom na raz. czy jest coś takiego?