the test of the codes should work
- Code: Select all
################################################################ MOD Title]oxpus.de > (Karsten Ude) [url=http://www.oxpus.de#]http://www.oxpus.de#[/url]# MOD Description: This mod can disable the Word Censor on choosen forum setting on ACP.## MOD Version: 1.0.1#### Installation Level: Easy## Installation Time: 3-5 Minutes## Files To Edit: 6## viewforum.php## viewtopic.php## admin/admin_forums.php## language/lang_english/lang_admin.php## language/lang_german/lang_admin.php## templates/subSilver/admin/forum_edit_body.tpl#### Included Files: n/a################################################################ For Security Purposes, Please Check: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] 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: [url=http://www.phpbb.com/mods/#]http://www.phpbb.com/mods/#[/url]############################################################### Author Notes:#### Instead entering the given SQL-Statement, you can upload the file db_update.php## to your phpbb root directory and run this with your browser.## This file will do all nessassary changes in the database for you.## After using this file, please delete it to avoid errors.#### This mod needs the Attachment Mod by Acid Burn.################################################################## MOD History:#### 2005-01-23 - Version 1.0.1## - Fix replacements on viewtopic.php#### 2004-08-08 - Version 1.0.0## - First release################################################################## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD############################################################## ##-----[ SQL ]------------------------------------------#ALTER TABLE phpbb_forums ADD COLUMN disable_word_censor TINYINT(1) DEFAULT '0' NOT NULL; ##-----[ OPEN ]------------------------------------------#viewforum.php ##-----[ FIND ]------------------------------------------# $topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title']; ##-----[ REPLACE WITH ]------------------------------------------# $topic_title = ( count($orig_word) && $forum_row['disable_word_censor'] == 0 ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title']; ##-----[ OPEN ]------------------------------------------#viewtopic.php ##-----[ FIND ]------------------------------------------#$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . " FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . " WHERE $join_sql AND f.forum_id = t.forum_id $order_sql"; ##-----[ IN-LINE FIND ]------------------------------------------#f.auth_attachments ##-----[ IN-LINE AFTER, ADD ]------------------------------------------#, f.disable_word_censor ##-----[ FIND ]------------------------------------------#//// Censor topic title//if ( count($orig_word) ) ##-----[ REPLACE WITH ]------------------------------------------#//// Censor topic title//if ( count($orig_word) && ($forum_topic_data['disable_word_censor'] == 0) ) ##-----[ FIND ]------------------------------------------# if ( count($orig_word) ) ##-----[ REPLACE WITH ]------------------------------------------# if ( count($orig_word) && ($forum_topic_data['disable_word_censor'] == 0) ) ##-----[ FIND ]------------------------------------------# for($i = 0; $i < $vote_options; $i++) { if ( count($orig_word) ) ##-----[ REPLACE WITH ]------------------------------------------# for($i = 0; $i <vote_options> $lang['Days'], ##-----[ AFTER, ADD ]------------------------------------------# 'L_DISABLE_WORD_CENSOR' => $lang['Disable_word_censor'], ##-----[ FIND ]------------------------------------------# 'FORUM_NAME' => $forumname, ##-----[ AFTER, ADD ]------------------------------------------# 'DISABLE_WORD_CENSOR_YES' => $disable_word_censor_yes, 'DISABLE_WORD_CENSOR_NO' => $disable_word_censor_no, 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], ##-----[ FIND ]------------------------------------------# $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ") VALUES ('" . $next_id . "', '" . str_replace("'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")"; ##-----[ IN-LINE FIND ]------------------------------------------#prune_enable ##-----[ IN-LINE AFTER, ADD ]------------------------------------------#, disable_word_censor ##-----[ IN-LINE FIND ]------------------------------------------#intval($HTTP_POST_VARS['prune_enable']) ##-----[ IN-LINE AFTER, ADD ]------------------------------------------# . ", " . intval($HTTP_POST_VARS['disable_word_censor']) ##-----[ FIND ]------------------------------------------# $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]); ##-----[ IN-LINE FIND ]------------------------------------------#prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . " ##-----[ IN-LINE AFTER, ADD ]------------------------------------------#, disable_word_censor = " . intval($HTTP_POST_VARS['disable_word_censor']) . " ##-----[ OPEN ]------------------------------------------#language/lang_english/lang_admin.php ##-----[ FIND ]------------------------------------------#$lang['Click_return_forumadmin'] = 'Click %sHere%s to return to Forum Administration'; ##-----[ AFTER, ADD ]------------------------------------------#$lang['Disable_word_censor'] = 'Disable word censors on this forum'; ##-----[ OPEN ]------------------------------------------#language/lang_german/lang_admin.php ##-----[ FIND ]------------------------------------------#$lang['Click_return_forumadmin'] = 'Klicke %shier%s, um zur Forumsadministration zurÃÂÂ ¼ckzukehren'; ##-----[ AFTER, ADD ]------------------------------------------#$lang['Disable_word_censor'] = 'Word-Zensur in diesem Forum abschalten'; ##-----[ OPEN ]------------------------------------------#templates/subSilver/admin/forum_edit_body.tpl ##-----[ FIND ]------------------------------------------# <tr> <td>{L_FORUM_STATUS}</td> <td><select>{S_STATUS_LIST}</select></td> </tr> ##-----[ AFTER, ADD ]------------------------------------------# <tr> <td>{L_DISABLE_WORD_CENSOR}</td> <td><input> {L_YES} <input> {L_NO}</td> </tr> ##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM