Fehler beim 'HACK' Counter deaktivieren
Verfasst: 03.05.2006 03:11
Folgender Fehler tritt auf:Gändert habe ich alles nach dieser Beschreibung:Habe ich mein eigenes template genommen
ist das der Grund für den Fehler?? Oder ist es doch was anderes?
Code: Alles auswählen
Couldn't update forum information
DEBUG MODE
SQL Error : 1054 Unknown column 'count_posts' in 'field list'
UPDATE phpbb_1forums SET forum_name = 'Gästetalk', cat_id = 4, forum_desc = 'Für diejenigen, die sich nicht anmelden wollen', forum_status = 0, prune_enable = 0 , count_posts = 1 WHERE forum_id = 14
Line : 447
File : admin_forums.php
Anstelle von###############################################
## Hack Title: Count posts?
## Hack Version: 1.0.0
## Author: Antony Bailey
## Description: Allows you to select if posts in forum are counted upon creation.
## Compatibility: 2.0.6
##
## Installation Level: Easy
## Installation Time: 5 minutes.
## Files To Edit: 4
## functions_post.php
## lang_admin.php
## forum_edit_body.tpl
## admin_forums.php
##
## History:
## 1.0.0: Initial Release.
##
## Support: http://www.phpbbsupport.co.uk
## Copyright: ©2003 Post Counts? 1.0.0 - Antony Bailey
##
###############################################
## You downloaded this hack from phpBBSupport.co.uk, as such this is not a official phpBB hack.
## This means that support can not be found for this at phpBB.com, so please visit http://www.phpbbsupport.co.uk
###############################################
##
###############################################
## 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.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## http://www.gnu.org/copyleft/gpl.html
###############################################
#
#----[ SQL ]-----------------------------------------------
#
ALTER TABLE `phpbb_forums` ADD `count_posts` CHAR(1) DEFAULT '1' NOT NULL;
#
#----[ OPEN ]----------------------------------------------------
#
includes/functions_post.php
#
#----[ FIND ]----------------------------------------------------
#
$sign = ($mode == 'delete') ? '- 1' : '+ 1';
#
#----[ REPLACE WITH ]--------------------------------------------
#
$sql = "SELECT * FROM " .
FORUMS_TABLE . "
WHERE forum_id = $forum_id";
$result = $db->sql_query($sql);
$forum_information = $db->sql_fetchrow($result);
$count_posts = $forum_information['count_posts'];
if ($mode == 'delete')
{
if ($count_posts)
{
$sign = "- 1";
}
else
{
$sign = "";
}
}
else
{
if ($count_posts)
{
$sign = "+ 1";
}
else
{
$sign = "";
}
}
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/forum_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_FORUM_STATUS}</td>
<td class="row2"><select name="forumstatus">{S_STATUS_LIST}</select></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_COUNT_POSTS}</td>
<td class="row2"><input type="radio" name="count_posts" value="1" {COUNT_POSTS_YES} />
{L_YES} <input type="radio" name="count_posts" value="0" {COUNT_POSTS_NO}
/> {L_NO}</td>
</tr>
#
#----[ OPEN ]----------------------------------------------------
#
admin/admin_forums.php
#
#----[ FIND ]----------------------------------------------------
#
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']) . "
#
#----[ IN-LINE AFTER ADD ]----------------------------------------
#
, count_posts = " . intval($HTTP_POST_VARS['count_posts']) . "
#
#----[ FIND ]----------------------------------------------------
#
$forumdesc = $row['forum_desc'];
$forumstatus = $row['forum_status'];
#
#----[ AFTER ADD ]-------------------------------------------------
#
$countposts = $row['count_posts'];
#
#----[ FIND ]------------------------------------------------------
#
$forumdesc = '';
$forumstatus = FORUM_UNLOCKED;
#
#----[ AFTER ADD ]-------------------------------------------------
#
$countposts = TRUE;
#
#----[ FIND ]------------------------------------------------------
#
'DESCRIPTION' => $forumdesc)
#
#----[ BEFORE, ADD ]-----------------------------------------------
#
'COUNT_POSTS_YES' => ($row['count_posts'] ? 'checked="checked"' : ''),
'COUNT_POSTS_NO' => (!$row['count_posts'] ? 'checked="checked"' : ''),
'L_COUNT_POSTS' => $lang['Post_count'],
'L_YES' => $lang['Yes'],
'L_NO' => $lang['No'],
#
#----[ OPEN ]----------------------------------------------------
#
language/lang_english/lang_admin.php
#
#----[ FIND ]----------------------------------------------------
#
?>
#
#----[ BEFORE, ADD ]---------------------------------------------
#
$lang['Post_count'] = 'Count Posts in this forum?';
#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End of Hack
Code: Alles auswählen
templates/subSilver/admin/forum_edit_body.tpl
ist das der Grund für den Fehler?? Oder ist es doch was anderes?