Seite 1 von 1

Suche Mod oder Möglichkeit die Postinganzahl zu entfernen

Verfasst: 16.04.2004 14:21
von Alrik
Hallo

Bei mir im Forum gibt es so ein rennen, wer die höchste Postingzahl hat, was zu super viel Spam führt.... Naja kann man es ausschalten, sodass die Zahlen nicht mehr angezeigt werden? Und wenn ja wie?


Patrick Müller

Verfasst: 16.04.2004 14:57
von SantaZ
am einfachsten ist es wenn du einfach in den templates z.B. viewtopic_body.tpl

den Eintrag {postrow.POSTER_POSTS} entfernst. Und überall da wo man die Beiträge noch sehen kann.

Die posts werden dann noch weiter gezählt nur halt nicht mehr Angezeigt.

Verfasst: 16.04.2004 15:23
von Firestarter
###############################################
## 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.4
##
## 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.
##
## Author Notes:
## Yes, a mod already exists for this. But this is different, and I like it this way. :P
##
## Support: http://www.phpbbhacks.com/forums
## Copyright: ©2003 Post Counts? 1.0.0 - Antony Bailey
##
###############################################
## You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
## Please visit http://www.phpbbhacks.com/forums for support.
###############################################
##
###############################################
## This hack is released under the GPL License.
## This hack can be freely used, but not distributed, without permission.
## Intellectual Property is retained by the hack author(s) listed above.
###############################################
#
#----[ 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}&nbsp;<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']) . ", sort_order = " . intval($HTTP_POST_VARS['sort_order']) . "

#
#----[ 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 ]-----------------------------------
#
#----[ SQL QUERY ]-----------------------------------------------
#
ALTER TABLE `phpbb_forums` ADD `count_posts` CHAR(1) DEFAULT '1' NOT NULL;
#
# EoM


These edits are untested by me.

These were provided by Ricky_Racer from phpBBHacks.com.

They make alterations to the find lines for the hack.

includes/functions_post.php

#
#----[ FIND ]----------------------------------------------------
#


$sign = ($mode == 'delete') ? '- 1' : '+ 1';


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']) . "