Drupal refresh
В установке написано найти в admin/admin_forums.php
Код: Выделить всё
prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
Код: Выделить всё
prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
Такая строка просто есть. Чтобы что-то понять, читайте до белой горячки в глазах тему Как устанавливать моды.ANTIHacker писал(а):Но такой строки просто нет! Или я что-то не понимаю?
Код: Выделить всё
#
#-------[ OPEN ]-------------
#
posting.php
#
#-------[ FIND ]-------------
# NOTE: Whole string is longer
#
update_post_stats($mode, $post_data
#
#-----[ BEFORE, ADD ]----------------------------------
#
$post_data['forum_postcount'] = $post_info['forum_postcount'];
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-------[ FIND ]-------------
#
$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;
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $post_data['forum_postcount'] == 0 )
{
return;
}
Код: Выделить всё
<?php
/***************************************************************************
* admin_forums.php
* -------------------
* begin : Thursday, Jul 12, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: admin_forums.php,v 1.40.2.12 2005/05/07 22:18:10 acydburn Exp $
*
***************************************************************************/
'U_FORUM_MOVE_UP' => append_sid("admin_forums.$phpEx?mode=forum_order&move=-15&" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&move=15&" . POST_FORUM_URL . "=$forum_id"),
'U_FORUM_RESYNC' => append_sid("admin_forums.$phpEx?mode=forum_sync&" . POST_FORUM_URL . "=$forum_id"))
);
}// if ... forumid == catid
} // for ... forums
} // for ... categories
}// if ... total_categories
$template->pparse("body");
include('./page_footer_admin.'.$phpEx);
?>
Код: Выделить всё
Couldn't update forum information
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near 'forum_postcount = 1, WHERE forum_id = 18' at line 2
UPDATE phpbb_forums SET forum_name = '', cat_id = 0, forum_desc = '', forum_status = 0 forum_postcount = 1, WHERE forum_id = 18
Line : 439
File : admin_forums.php
Неверный синтаксис sql-запросаЧто обозначает данна ошибка?
Код: Выделить всё
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . " forum_postcount = " . intval($HTTP_POST_VARS['forum_postcount']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
Код: Выделить всё
case 'modforum':
// Modify a forum in the DB
if( isset($HTTP_POST_VARS['prune_enable']))
{
if( $HTTP_POST_VARS['prune_enable'] != 1 )
{
$HTTP_POST_VARS['prune_enable'] = 0;
}
}
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . " forum_postcount = " . intval($HTTP_POST_VARS['forum_postcount']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
if( !$result = $db->sql_query($sql) )
Код: Выделить всё
case 'modforum':
// Modify a forum in the DB
if( isset($HTTP_POST_VARS['prune_enable']))
{
if( $HTTP_POST_VARS['prune_enable'] != 1 )
{
$HTTP_POST_VARS['prune_enable'] = 0;
}
}
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
if( !$result = $db->sql_query($sql) )
И при удалении сообщения в форуме с отключеным счётчиком у пользователя вычитают 1 пост.##############################################################
## MOD Title: Disable Post Count Increase
## MOD Author: Xore < xore@azuriah.com > (Robert Hetzler) http://www.azuriah.com
## MOD Description: This mod enables you to selectively turn off post count increments on each forum
## MOD Version: 1.0.1