I only want to know if your great Mod "Confirmation Topic" can works very well in my Plus 1.52 ?
If yes, I will install it for sure.
Cheers.
Mario
Code: Alles auswählen
#
#-----%u5b OPEN %u5d------------------------------------------
#
includes/functions.php
#
#-----%u5b FIND %u5d------------------------------------------
#
function get_db_stat%u28$mode%u29
%u7b
global $board_config, $db;Code: Alles auswählen
function get_db_stat%u28$mode%u29
%u7b
global $db;Code: Alles auswählen
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
global $userdata;Code: Alles auswählen
#
#-----%u5b FIND %u5d------------------------------------------
#
$match_word = addslashes%u28'%' . str_replace%u28'*', '', $split_search%u5b$i%u5d%u29 . '%'%u29;
$search_msg_only = %u28 $search_fields %u29 ? "OR post_subject LIKE '$match_word'" %u3a '';
$sql = "SELECT post_id
FROM " . POSTS_TEXT_TABLE . "
WHERE post_text LIKE '$match_word'
$search_msg_only";Code: Alles auswählen
$match_word = addslashes%u28'%' . str_replace%u28'*', '', $split_search%u5b$i%u5d%u29 . '%'%u29;
$search_msg_only = %u28 $search_fields %u29 ? "OR pt.post_subject LIKE '$match_word'" %u3a '';
$search_msg_only .= %u28$only_bluecards%u29 ? " AND p.post_bluecard>0 AND pt.post_id=p.post_id " %u3a "";
$sql = "SELECT pt.post_id
FROM " . POSTS_TEXT_TABLE . "
pt " . %u28%u28$only_bluecards%u29 ? ','.POSTS_TABLE . ' p ' %u3a ''%u29 . "
WHERE pt.post_text LIKE '$match_word'
$search_msg_only";Code: Alles auswählen
$sql = "SELECT pt.post_id, p.forum_id
FROM " . POSTS_TEXT_TABLE . " pt, " . POSTS_TABLE . " p
WHERE pt.post_text LIKE '$match_word'
AND p.post_id = pt.post_idCode: Alles auswählen
//
// Start auth check
//
$is_auth = array%u28%u29;
//-- mod %u3a categories hierarchy --------------------------------------------------------------------
//-- delete
// $is_auth = auth%u28AUTH_ALL, $forum_id, $userdata, $forum_row%u29;
//-- add
$is_auth = $tree%u5b'auth'%u5d%u5bPOST_FORUM_URL . $forum_id%u5d;
//-- fin mod %u3a categories hierarchy ----------------------------------------------------------------Code: Alles auswählen
// Check forum confirmation for the current forum
$mode = %u28isset%u28$HTTP_GET_VARS%u5b'mode'%u5d%u29%u29 ? $HTTP_GET_VARS%u5b'mode'%u5d %u3a '';
if %u28$mode == 'confirm_view'%u29
%u7b
$sql = "SELECT forum_confirm_id FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
if %u28!%u28$result = $db->sql_query%u28$sql%u29%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not display the confirmation for this forum', '', __LINE__, __FILE__, $sql%u29;
%u7d
$row = $db->sql_fetchrow%u28$result%u29;
$forum_confirm_id = $row%u5b'forum_confirm_id'%u5d;
$db->sql_freeresult%u28$result%u29;
if %u28intval%u28$forum_confirm_id%u29 != 0%u29
%u7b
$gen_simple_header = TRUE;
include%u28$phpbb_root_path . 'includes/page_header.'.$phpEx%u29;
create_confirm_preview%u28$forum_confirm_id%u29;
include%u28$phpbb_root_path . 'includes/page_tail.'.$phpEx%u29;
%u7d
%u7d
$forum_confirm = build_user_confirm_status%u28$forum_id%u29;
$confirm_forum = get_forum_confirm%u28%u29;
if %u28$confirm_forum%u5b$forum_id%u5d != 0%u29
%u7b
if %u28$forum_confirm%u29
%u7b
$template->assign_block_vars%u28'confirm_topic', array%u28
'L_CONFIRM_TOPIC' => $lang%u5b'Forum_confirm_header'%u5d,
'U_CONFIRM_TOPIC' => append_sid%u28"viewforum.$phpEx?".POST_FORUM_URL."=$forum_id&mode=confirm_view"%u29,
'CONFIRM_STAT' => get_forum_confirm_stat%u28$forum_id%u29%u29
%u29;
%u7d
else
%u7b
redirect%u28append_sid%u28"forum_confirm.$phpEx?".POST_FORUM_URL."=$forum_id"%u29%u29;
%u7d
%u7d
// End Confirmation CheckCode: Alles auswählen
//
// Start auth check
//
$is_auth = array%u28%u29;
//-- mod %u3a categories hierarchy --------------------------------------------------------------------
//-- delete
// $is_auth = auth%u28AUTH_ALL, $forum_id, $userdata, $forum_topic_data%u29;
//
// if%u28 !$is_auth%u5b'auth_view'%u5d || !$is_auth%u5b'auth_read'%u5d %u29
//-- add
$is_auth = $tree%u5b'auth'%u5d%u5bPOST_FORUM_URL . $forum_id%u5d;
if %u28 !$is_auth%u5b'auth_read'%u5d %u29
//-- fin mod %u3a categories hierarchy ----------------------------------------------------------------Code: Alles auswählen
// Check forum confirmation for the current forum
$forum_confirm = build_user_confirm_status%u28$forum_id%u29;
if %u28!$forum_confirm%u29
%u7b
redirect%u28append_sid%u28"forum_confirm.$phpEx?".POST_FORUM_URL."=$forum_id"%u29%u29;
%u7d
// End Confirmation CheckCode: Alles auswählen
#
#-----[ COPY ]------------------------------------------
#
copy viewtopic_confirm.php to viewtopic_confirm.php
copy templates/subSilver/viewtopic_confirm_body.tpl to templates/subSilver/viewtopic_confirm_body.tpl#
#-----[ COPY ]------------------------------------------
#
copy admin/admin_forum_confirm.php to admin/admin_forum_confirm.php
copy forum_confirm.php to forum_confirm.php
copy templates/subSilver/forum_confirm_preview.tpl to templates/subSilver/forum_confirm_preview.tpl
copy templates/subSilver/forum_confirm_body.tpl to templates/subSilver/forum_confirm_view_body.tpl
copy templates/subSilver/admin/forum_confirm_body.tpl to templates/subSilver/admin/forum_confirm_body.tpl
copy templates/subSilver/admin/forum_confirm_edit_body.tpl to templates/subSilver/admin/forum_confirm_edit_body.tpl
copy templates/subSilver/admin/forum_user_confirm_manage.tpl to templates/subSilver/admin/forum_user_confirm_manage.tpl
Code: Alles auswählen
##############################################################
## MOD Title%u3a Confirmation Topic
## MOD Author%u3a OXPUS < webmaster@oxpus.de > %u28Karsten Ude%u29 http%u3a//www.oxpus.de
## MOD Description%u3a This Mod integrates a confirmation topic which must be confirmed by users
## before enter a forum by the regular way.
## Use this part if you are using a phpBB and have installed
## the Categories Hierarchy Mod 2.0.5 %u28RC1 or RC2%u29.
## MOD Version%u3a 1.0.3
##
## Installation Level%u3a Intermediate
## Installation Time%u3a 30 Min
##
## Files To Edit%u3a 21
## admin/admin_board.php
## admin/admin_forums.php
## includes/auth.php
## includes/constants.php
## includes/functions.php
## includes/functions_categories_hierarchy.php
## includes/functions_post.php
## includes/sessions.php
## language/lang_english/lang_admin.php
## language/lang_german/lang_admin.php
## language/lang_english/lang_main.php
## language/lang_german/lang_main.php
## index.php
## posting.php
## search.php
## viewforum.php
## viewtopic.php
## templates/subSilver/admin/board_config_body.tpl
## templates/subSilver/admin/forum_edit_body.tpl
## templates/subSilver/index_box.tpl
## templates/subSilver/viewforum_body.tpl
##
## Included Files%u3a 2
## viewtopic_confirm.php
## templates/subSilver/viewtopic_confirm_body.tpl
##############################################################
## For Security Purposes, Please Check%u3a http%u3a//www.phpbb.com/mods/downloads/ 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 MODs not offered
## in our MOD-Database, located at%u3a http%u3a//www.phpbb.com/mods/downloads/
##############################################################
## Author Notes%u3a
##
## 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.
##
## ----------
##
## If you are using the extended forum management from the Categories Hierarchy Mod, then
## look into the folder goodies, too.
##
##############################################################
## MOD History%u3a
##
## 2006-02-02 - Version 1.0.3
## - FIX Guest Permissions
## For Update reinstall the part for auth.php
##
## 2005-11-02 - Version 1.0.2
## - ADD Compliance to phpBB 2.0.18
##
## 2005-10-29 - Version 1.0.1
## - Insert SQL-Statements in the how-to
##
## 2005-05-26 - Version 1.0.0
## - First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----%u5b SQL %u5d------------------------------------------
#
CREATE TABLE phpbb_forum_confirmation %u28
forum_id SMALLINT%u285%u29 UNSIGNED NOT NULL DEFAULT '0',
user_id MEDIUMINT%u288%u29 NOT NULL DEFAULT '0',
confirm_time INT%u2811%u29 NOT NULL DEFAULT '0',
KEY %u28forum_id, user_id%u29
%u29;
ALTER TABLE phpbb_forums ADD COLUMN forum_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL AFTER forum_topics;
ALTER TABLE phpbb_topics ADD COLUMN topic_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL;
INSERT INTO phpbb_config %u28config_name, config_value%u29 VALUES %u28'no_confirm_view', '0'%u29;
#
#-----%u5b COPY %u5d------------------------------------------
#
copy viewtopic_confirm.php to viewtopic_confirm.php
copy templates/subSilver/viewtopic_confirm_body.tpl to templates/subSilver/viewtopic_confirm_body.tpl
#
#-----%u5b OPEN %u5d------------------------------------------
#
admin/admin_board.php
#
#-----%u5b FIND %u5d------------------------------------------
#
$smtp_yes = %u28 $new%u5b'smtp_delivery'%u5d %u29 ? "checked=\"checked\"" %u3a "";
$smtp_no = %u28 !$new%u5b'smtp_delivery'%u5d %u29 ? "checked=\"checked\"" %u3a "";
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
$no_confirm_view_yes = %u28 $new%u5b'no_confirm_view'%u5d %u29 ? "checked=\"checked\"" %u3a "";
$no_confirm_view_no = %u28 !$new%u5b'no_confirm_view'%u5d %u29 ? "checked=\"checked\"" %u3a "";
#
#-----%u5b FIND %u5d------------------------------------------
#
"L_SMTP_PASSWORD_EXPLAIN" => $lang%u5b'SMTP_password_explain'%u5d,
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
"L_NO_CONFIRM_VIEW" => $lang%u5b'Forum_view_not_confirmed'%u5d,
#
#-----%u5b FIND %u5d------------------------------------------
#
"SMTP_PASSWORD" => $new%u5b'smtp_password'%u5d,
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
"NO_CONFIRM_VIEW_YES" => $no_confirm_view_yes,
"NO_CONFIRM_VIEW_NO" => $no_confirm_view_no,
#
#-----%u5b OPEN %u5d------------------------------------------
#
admin/admin_forums.php
#
#-----%u5b FIND %u5d------------------------------------------
#
$forumstatus = $row%u5b'forum_status'%u5d;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
$forum_confirm_yes = %u28$row%u5b'forum_confirm'%u5d == TRUE%u29 ? 'checked="checked"' %u3a '';
$forum_confirm_no = %u28$row%u5b'forum_confirm'%u5d == FALSE %u29 ? 'checked="checked"' %u3a '';
#
#-----%u5b FIND %u5d------------------------------------------
#
$prune_enabled = '';
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
$forum_confirm_yes = '';
$forum_confirm_no = 'checked="checked"';
#
#-----%u5b FIND %u5d------------------------------------------
#
'L_DAYS' => $lang%u5b'Days'%u5d,
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
'L_FORUM_CONFIRM' => $lang%u5b'Forum_confirmation'%u5d,
'L_FORUM_CONFIRM_EXPLAIN' => $lang%u5b'Forum_confirmation_explain'%u5d,
#
#-----%u5b FIND %u5d------------------------------------------
#
'FORUM_NAME' => $forumname,
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
'FORUM_CONFIRM_YES' => $forum_confirm_yes,
'FORUM_CONFIRM_NO' => $forum_confirm_no,
'L_YES' => $lang%u5b'Yes'%u5d,
'L_NO' => $lang%u5b'No'%u5d,
#
#-----%u5b FIND %u5d------------------------------------------
#
$sql = "INSERT INTO " . FORUMS_TABLE . " %u28forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . "%u29
VALUES %u28'" . $next_id . "', '" . str_replace%u28"\'", "''", $HTTP_POST_VARS%u5b'forumname'%u5d%u29 . "', " . intval%u28$HTTP_POST_VARS%u5bPOST_CAT_URL%u5d%u29 . ", '" . str_replace%u28"\'", "''", $HTTP_POST_VARS%u5b'forumdesc'%u5d%u29 . "', $next_order, " . intval%u28$HTTP_POST_VARS%u5b'forumstatus'%u5d%u29 . ", " . intval%u28$HTTP_POST_VARS%u5b'prune_enable'%u5d%u29 . $value_sql . "%u29";
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
prune_enable
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
, forum_confirm
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
intval%u28$HTTP_POST_VARS%u5b'prune_enable'%u5d%u29
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
. ", " . intval%u28$HTTP_POST_VARS%u5b'forum_confirm'%u5d%u29
#
#-----%u5b FIND %u5d------------------------------------------
#
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace%u28"\'", "''", $HTTP_POST_VARS%u5b'forumname'%u5d%u29 . "', cat_id = " . intval%u28$HTTP_POST_VARS%u5bPOST_CAT_URL%u5d%u29 . ", forum_desc = '" . str_replace%u28"\'", "''", $HTTP_POST_VARS%u5b'forumdesc'%u5d%u29 . "', forum_status = " . intval%u28$HTTP_POST_VARS%u5b'forumstatus'%u5d%u29 . ", prune_enable = " . intval%u28$HTTP_POST_VARS%u5b'prune_enable'%u5d%u29 . "
WHERE forum_id = " . intval%u28$HTTP_POST_VARS%u5bPOST_FORUM_URL%u5d%u29;
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
prune_enable = " . intval%u28$HTTP_POST_VARS%u5b'prune_enable'%u5d%u29
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
. ", forum_confirm = " . intval%u28$HTTP_POST_VARS%u5b'forum_confirm'%u5d%u29
#
#-----%u5b OPEN %u5d------------------------------------------
#
includes/auth.php
#
#-----%u5b FIND %u5d------------------------------------------
#
function auth%u28$type, $forum_id, $userdata, $f_access = ''%u29
%u7b
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
$f_access = ''
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
, $no_confirm_view = TRUE
#
#-----%u5b FIND %u5d------------------------------------------
#
global $db, $lang;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
// Read and prepare user confirmations
$confirmed_forums = $forum_confirm = $topic_confirm = array%u28%u29;
$forum_confirm = get_forum_confirmations%u28%u29;
$topic_confirm = get_topic_confirmations%u28%u29;
$confirmed_forums = %u28$userdata%u5b'forum_confirm'%u5d != ''%u29 ? explode%u28',', $userdata%u5b'forum_confirm'%u5d%u29 %u3a array%u28%u29;
if %u28%u28$userdata%u5b'user_level'%u5d == USER && $userdata%u5b'session_logged_in'%u5d%u29 || $userdata%u5b'user_id'%u5d == ANONYMOUS%u29
%u7b
$keys = %u28$no_confirm_view == TRUE%u29 ? 0 %u3a TRUE;
%u7d
// END Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
if %u28 $forum_id != AUTH_LIST_ALL %u29
%u7b
$value = $f_access%u5b$key%u5d;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$auth_confirm = TRUE;
if %u28$userdata%u5b'user_id'%u5d == ANONYMOUS%u29
%u7b
$auth_confirm = %u28in_array%u28$forum_id, $forum_confirm%u29 && in_array%u28$forum_id, $topic_confirm%u29%u29 ? TRUE %u3a 0;
%u7d
if %u28$userdata%u5b'session_logged_in'%u5d && $userdata%u5b'user_level'%u5d == USER%u29
%u7b
$auth_confirm = %u28in_array%u28$forum_id, $forum_confirm%u29 && in_array%u28$forum_id, $topic_confirm%u29 && !in_array%u28$forum_id, $confirmed_forums%u29%u29 ? 0 %u3a TRUE;
$auth_confirm = %u28!in_array%u28$forum_id, $forum_confirm%u29%u29 ? TRUE %u3a %u28%u28!in_array%u28$forum_id, $topic_confirm%u29%u29 ? TRUE %u3a $auth_confirm%u29;
$keys = %u28in_array%u28$forum_id, $forum_confirm%u29 && in_array%u28$forum_id, $topic_confirm%u29 && in_array%u28$forum_id, $confirmed_forums%u29%u29 ? 0 %u3a $keys;
$keys = %u28!in_array%u28$forum_id, $forum_confirm%u29%u29 ? 0 %u3a %u28%u28!in_array%u28$forum_id, $topic_confirm%u29%u29 ? 0 %u3a $keys%u29;
%u7d
// END Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
case AUTH_ALL%u3a
$auth_user%u5b$key%u5d = TRUE;
#
#-----%u5b REPLACE WITH %u5d------------------------------------------
#
case AUTH_ALL%u3a
$auth_user%u5b$key%u5d = %u28$keys == TRUE && $key != 'auth_view'%u29 ? 0 %u3a %u28%u28$key == 'auth_view' || $key == 'auth_read'%u29 ? TRUE %u3a $auth_confirm%u29;
#
#-----%u5b FIND %u5d------------------------------------------
#
case AUTH_REG%u3a
$auth_user%u5b$key%u5d = %u28 $userdata%u5b'session_logged_in'%u5d %u29 ? TRUE %u3a 0;
#
#-----%u5b REPLACE WITH %u5d------------------------------------------
#
case AUTH_REG%u3a
$auth_user%u5b$key%u5d = %u28$keys == TRUE && $key != 'auth_view'%u29 ? 0 %u3a %u28%u28 $userdata%u5b'session_logged_in'%u5d && %u28$key == 'auth_view' || $key == 'auth_read'%u29%u29 ? TRUE %u3a $auth_confirm%u29;
#
#-----%u5b FIND %u5d------------------------------------------
#
else
%u7b
for%u28$k = 0; $k < count%u28$f_access%u29; $k++%u29
%u7b
$value = $f_access%u5b$k%u5d%u5b$key%u5d;
$f_forum_id = $f_access%u5b$k%u5d%u5b'forum_id'%u5d;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$auth_confirm = TRUE;
if %u28$userdata%u5b'user_id'%u5d == ANONYMOUS%u29
%u7b
$auth_confirm = %u28in_array%u28$f_forum_id, $forum_confirm%u29 && in_array%u28$f_forum_id, $topic_confirm%u29%u29 ? TRUE %u3a 0;
%u7d
if %u28$userdata%u5b'session_logged_in'%u5d && $userdata%u5b'user_level'%u5d == USER%u29
%u7b
$auth_confirm = %u28in_array%u28$f_forum_id, $forum_confirm%u29 && in_array%u28$f_forum_id, $topic_confirm%u29 && !in_array%u28$f_forum_id, $confirmed_forums%u29%u29 ? 0 %u3a TRUE;
$auth_confirm = %u28!in_array%u28$f_forum_id, $forum_confirm%u29%u29 ? TRUE %u3a %u28%u28!in_array%u28$f_forum_id, $topic_confirm%u29%u29 ? TRUE %u3a $auth_confirm%u29;
$keys = %u28in_array%u28$forum_id, $forum_confirm%u29 && in_array%u28$forum_id, $topic_confirm%u29 && in_array%u28$forum_id, $confirmed_forums%u29%u29 ? 0 %u3a $keys;
$keys = %u28!in_array%u28$f_forum_id, $forum_confirm%u29%u29 ? 0 %u3a %u28%u28!in_array%u28$f_forum_id, $topic_confirm%u29%u29 ? 0 %u3a $keys%u29;
%u7d
// END Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
case AUTH_ALL%u3a
$auth_user%u5b$f_forum_id%u5d%u5b$key%u5d = TRUE;
#
#-----%u5b REPLACE WITH %u5d------------------------------------------
#
case AUTH_ALL%u3a
$auth_user%u5b$f_forum_id%u5d%u5b$key%u5d = %u28$keys == TRUE && $key != 'auth_view'%u29 ? 0 %u3a %u28%u28$key == 'auth_view' || $key == 'auth_read'%u29 ? TRUE %u3a $auth_confirm%u29;
#
#-----%u5b FIND %u5d------------------------------------------
#
case AUTH_REG%u3a
$auth_user%u5b$f_forum_id%u5d%u5b$key%u5d = %u28 $userdata%u5b'session_logged_in'%u5d %u29 ? TRUE %u3a 0;
#
#-----%u5b REPLACE WITH %u5d------------------------------------------
#
case AUTH_REG%u3a
$auth_user%u5b$f_forum_id%u5d%u5b$key%u5d = %u28$keys == TRUE && $key != 'auth_view'%u29 ? 0 %u3a %u28%u28 $userdata%u5b'session_logged_in'%u5d && %u28$key == 'auth_view' || $key == 'auth_read'%u29%u29 ? TRUE %u3a $auth_confirm%u29;
#
#-----%u5b OPEN %u5d------------------------------------------
#
includes/constants.php
#
#-----%u5b FIND %u5d------------------------------------------
#
define%u28'POST_GLOBAL_ANNOUNCE', 3%u29;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
define%u28'POST_CONFIRMATION', 4%u29;
#
#-----%u5b FIND %u5d------------------------------------------
#
define%u28'FORUMS_TABLE', $table_prefix.'forums'%u29;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
define%u28'FORUMS_CONFIRM_TABLE', $table_prefix.'forum_confirmation'%u29;
#
#-----%u5b OPEN %u5d------------------------------------------
#
includes/functions.php
#
#-----%u5b FIND %u5d------------------------------------------
#
?>
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
function get_forum_confirmations%u28$forum_id = -1%u29
%u7b
global $db;
$sql_where = %u28$forum_id != -1%u29 ? 'AND forum_id = ' . $forum_id %u3a '';
$sql = "SELECT forum_id FROM " . FORUMS_TABLE . "
WHERE forum_confirm = " . TRUE . "
$sql_where";
if %u28!$result = $db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not fetch forum confirmation status', '', __LINE__, __FILE__, $sql%u29;
%u7d
$forum_confirm = array%u28%u29;
while %u28$row = $db->sql_fetchrow%u28$result%u29%u29
%u7b
$forum_confirm%u5b%u5d = $row%u5b'forum_id'%u5d;
%u7d
$db->sql_freeresult%u28$result%u29;
return %u28count%u28$forum_confirm%u29 == 0 %u29 ? array%u28%u29 %u3a $forum_confirm;
%u7d
function get_topic_confirmations%u28$forum_id = -1%u29
%u7b
global $db;
$sql_where = %u28$forum_id != -1%u29 ? 'AND forum_id = ' . $forum_id %u3a '';
$sql = "SELECT forum_id FROM " . TOPICS_TABLE . "
WHERE topic_confirm = " . POST_CONFIRMATION . "
$sql_where";
if %u28!$result = $db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not fetch forum confirmation status', '', __LINE__, __FILE__, $sql%u29;
%u7d
$topic_confirm = array%u28%u29;
while %u28$row = $db->sql_fetchrow%u28$result%u29%u29
%u7b
$topic_confirm%u5b%u5d = $row%u5b'forum_id'%u5d;
%u7d
$db->sql_freeresult%u28$result%u29;
return %u28count%u28$topic_confirm%u29 == 0 %u29 ? array%u28%u29 %u3a $topic_confirm;
%u7d
function get_topic_confirm_id%u28$forum_id%u29
%u7b
global $db;
if %u28empty%u28$forum_id%u29%u29
%u7b
return false;
%u7d
$sql = "SELECT topic_id FROM " . TOPICS_TABLE . "
WHERE topic_confirm = " . POST_CONFIRMATION . "
AND forum_id = $forum_id";
if %u28!$result = $db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not fetch confirmation id', '', __LINE__, __FILE__, $sql%u29;
%u7d
while %u28$row = $db->sql_fetchrow%u28$result%u29%u29
%u7b
$topic_id = $row%u5b'topic_id'%u5d;
%u7d
$db->sql_freeresult%u28$result%u29;
return $topic_id;
%u7d
#
#-----%u5b OPEN %u5d------------------------------------------
#
includes/functions_categories_hierarchy.php
#
#-----%u5b FIND %u5d------------------------------------------
#
function get_user_tree%u28&$userdata%u29
%u7b
global $tree;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
global $board_config;
#
#-----%u5b FIND %u5d------------------------------------------
#
$wauth = auth%u28AUTH_ALL, AUTH_LIST_ALL, $userdata%u29;
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
$userdata
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
, '', $board_config%u5b'no_confirm_view'%u5d
#
#-----%u5b FIND %u5d------------------------------------------
#
function build_index%u28$cur='Root', $cat_break=false, &$forum_moderators, $real_level=-1, $max_level=-1, &$keys%u29
%u7b
global $template, $phpEx, $board_config, $lang, $images;
global $tree;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
global $forum_confirm, $topic_confirm, $confirmed_forums;
#
#-----%u5b FIND %u5d------------------------------------------
#
// send to template
$template->assign_block_vars%u28'catrow', array%u28%u29%u29;
$template->assign_block_vars%u28'catrow.forumrow', array%u28
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
// START Confirmation Topic
if %u28$data%u5b'forum_id'%u5d != ''%u29
%u7b
$forum_confirm_explain = '';
$topic_confirm_explain = '';
$forum_id = $data%u5b'forum_id'%u5d;
if%u28is_array%u28$forum_confirm%u29 && in_array%u28$forum_id, $forum_confirm%u29%u29
%u7b
if %u28$userdata%u5b'user_level'%u5d == ADMIN%u29
%u7b
$forum_confirm_explain = $lang%u5b'Forum_confirmation_explain'%u5d;
%u7d
if %u28is_array%u28$topic_confirm%u29 && in_array%u28$forum_id, $topic_confirm%u29%u29
%u7b
$data%u5b'tree.forum_posts'%u5d--;
$data%u5b'tree.forum_topics'%u5d--;
$topic_confirm_explain = %u28$userdata%u5b'user_level'%u5d <= USER%u29 ? $lang%u5b'Topic_confirmation_explain'%u5d %u3a '';
$forum_confirm_explain = %u28$userdata%u5b'user_level'%u5d == MOD%u29 ? $lang%u5b'Forum_confirmation_exist'%u5d %u3a %u28%u28$userdata%u5b'user_level'%u5d == ADMIN%u29 ? $lang%u5b'Forum_confirmation_exist'%u5d %u3a $forum_confirm_explain%u29;
%u7d
if %u28in_array%u28$forum_id, $confirmed_forums%u29 && $userdata%u5b'user_level'%u5d == USER%u29
%u7b
$topic_confirm_explain = '';
%u7d
%u7d
%u7d
// END Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
'MODERATORS' => $moderator_list,
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
'FORUM_CONFIRMATIONS' => $forum_confirm_explain,
'TOPIC_CONFIRMATIONS' => $topic_confirm_explain,
#
#-----%u5b OPEN %u5d--------------------------------------------------
#
includes/functions_post.php
#
#-----%u5b FIND %u5d--------------------------------------------------
#
function submit_post%u28$mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length%u29
#
#-----%u5b IN-LINE FIND %u5d--------------------------------------------------
#
&$topic_type
#
#-----%u5b IN-LINE AFTER, ADD %u5d--------------------------------------------------
#
, &$topic_confirm
#
#-----%u5b FIND %u5d--------------------------------------------------
#
$topic_vote = %u28!empty%u28$poll_title%u29 && count%u28$poll_options%u29 >= 2%u29 ? 1 %u3a 0;
#
#-----%u5b AFTER, ADD %u5d--------------------------------------------------
#
// START - Confirmation Topic
$topic_status_insert = %u28$topic_confirm == POST_CONFIRMATION%u29 ? TOPIC_LOCKED %u3a TOPIC_UNLOCKED;
$topic_status_update = %u28$topic_confirm == POST_CONFIRMATION%u29 ? ', topic_status = ' . TOPIC_LOCKED . ' ' %u3a '';
// END - Confirmation Topic
#
#-----%u5b FIND %u5d--------------------------------------------------
#
$sql = %u28$mode != "editpost"%u29 ? "INSERT INTO " . TOPICS_TABLE . " %u28topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote%u29 VALUES %u28'$post_subject', " . $userdata%u5b'user_id'%u5d . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote%u29" %u3a "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, " . %u28%u28$post_data%u5b'edit_vote'%u5d || !empty%u28$poll_title%u29%u29 ? ", topic_vote = " . $topic_vote %u3a ""%u29 . " WHERE topic_id = $topic_id";
#
#-----%u5b IN-LINE FIND %u5d--------------------------------------------------
#
topic_type
#
#-----%u5b IN-LINE AFTER, ADD %u5d--------------------------------------------------
#
, topic_confirm
#
#-----%u5b IN-LINE FIND %u5d--------------------------------------------------
#
" . TOPIC_UNLOCKED . ", $topic_type
#
#-----%u5b IN-LINE REPLACE WITH %u5d--------------------------------------------------
#
$topic_status_insert, $topic_type, $topic_confirm
#
#-----%u5b IN-LINE FIND %u5d--------------------------------------------------
#
topic_type = $topic_type
#
#-----%u5b IN-LINE AFTER, ADD %u5d--------------------------------------------------
#
, topic_confirm = $topic_confirm $topic_status_update
#
#-----%u5b FIND %u5d--------------------------------------------------
#
add_search_words%u28'single', $post_id, stripslashes%u28$post_message%u29, stripslashes%u28$post_subject%u29%u29;
#
#-----%u5b AFTER, ADD %u5d--------------------------------------------------
#
// END - Confirmation Topic
if %u28$mode == 'editpost' && $post_data%u5b'first_post'%u5d && $topic_confirm == POST_CONFIRMATION && $userdata%u5b'user_level'%u5d == ADMIN%u29
%u7b
$sql = "DELETE FROM " . FORUMS_CONFIRM_TABLE . "
WHERE forum_id = $forum_id";
if %u28!$db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Error in deleting confirmations after post edit', '', __LINE__, __FILE__, $sql%u29;
%u7d
%u7d
// END - Confirmation Topic
#
#-----%u5b FIND %u5d--------------------------------------------------
#
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id";
if %u28!$db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql%u29;
%u7d
#
#-----%u5b AFTER, ADD %u5d--------------------------------------------------
#
// START - Confirmation Topic
$sql = "DELETE FROM " . FORUMS_CONFIRM_TABLE . "
WHERE forum_id = $forum_id";
if %u28!$db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql%u29;
%u7d
// END - Confirmation Topic
#
#-----%u5b OPEN %u5d------------------------------------------
#
includes/sessions.php
#
#-----%u5b FIND %u5d------------------------------------------
#
$sessiondata%u5b'autologinid'%u5d = %u28!$admin%u29 ? %u28%u28 $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE %u29 ? $auto_login_key %u3a ''%u29 %u3a $sessiondata%u5b'autologinid'%u5d;
$sessiondata%u5b'userid'%u5d = $user_id;
%u7d
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$sql_fc = "SELECT forum_id, confirm_time FROM " . FORUMS_CONFIRM_TABLE . "
WHERE user_id = $user_id";
$confirmed_forums = '';
$confirmed_times = array%u28%u29;
if %u28$result_fc = $db->sql_query%u28$sql_fc%u29%u29
%u7b
$total_confirmations = $db->sql_numrows%u28$result_fc%u29;
if %u28$total_confirmations > 0%u29
%u7b
while %u28$row_fc = $db->sql_fetchrow%u28$result_fc%u29%u29
%u7b
$confirmed_forums .= %u28$confirmed_forums == ''%u29 ? $row_fc%u5b'forum_id'%u5d %u3a ', '.$row_fc%u5b'forum_id'%u5d;
$confirmed_times%u5b$row_fc%u5b'forum_id'%u5d%u5d = $row_fc%u5b'confirm_time'%u5d;
%u7d
%u7d
%u7d
$userdata%u5b'forum_confirm'%u5d = $confirmed_forums;
$userdata%u5b'forum_confirm_time'%u5d = $confirmed_times;
// END Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
setcookie%u28$cookiename . '_data', serialize%u28$sessiondata%u29, $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure%u29;
setcookie%u28$cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure%u29;
%u7d
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$sql_fc = "SELECT forum_id, confirm_time FROM " . FORUMS_CONFIRM_TABLE . "
WHERE user_id = ". $userdata%u5b'user_id'%u5d;
$confirmed_forums = '';
$confirmed_times = array%u28%u29;
if %u28$result_fc = $db->sql_query%u28$sql_fc%u29%u29
%u7b
$total_confirmations = $db->sql_numrows%u28$result_fc%u29;
if %u28$total_confirmations > 0%u29
%u7b
while %u28$row_fc = $db->sql_fetchrow%u28$result_fc%u29%u29
%u7b
$confirmed_forums .= %u28$confirmed_forums == ''%u29 ? $row_fc%u5b'forum_id'%u5d %u3a ', '.$row_fc%u5b'forum_id'%u5d;
$confirmed_times%u5b$row_fc%u5b'forum_id'%u5d%u5d = $row_fc%u5b'confirm_time'%u5d;
%u7d
%u7d
%u7d
$userdata%u5b'forum_confirm'%u5d = $confirmed_forums;
$userdata%u5b'forum_confirm_time'%u5d = $confirmed_times;
// END Confirmation Topic
#
#-----%u5b OPEN %u5d------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----%u5b FIND %u5d------------------------------------------
#
$lang%u5b'Forum_pruning'%u5d = 'Auto-pruning';
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$lang%u5b'Forum_confirmation'%u5d = 'Forum confirmation';
$lang%u5b'Forum_confirmation_explain'%u5d = 'Enable this function to be able to enter a topic confirmation each User %u28expected Mods and Admin%u29 must confirm before enter this forum';
$lang%u5b'Forum_view_not_confirmed'%u5d = 'Allow Guests to view the forum even this must be confirmed';
#
#-----%u5b OPEN %u5d------------------------------------------
#
language/lang_german/lang_admin.php
#
#-----%u5b FIND %u5d------------------------------------------
#
$lang%u5b'Forum_pruning'%u5d = 'Automatisches Pruning';
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$lang%u5b'Forum_confirmation'%u5d = 'Forumbestätigung';
$lang%u5b'Forum_confirmation_explain'%u5d = 'Aktiviere diese Funktion, um eine Forum-Bestätigung für dieses Forum zu erfassen, die jeder Benutzer %u28ausgenommen Mods und Admins%u29 bestätigen müssen, bevor die das Forum betreten';
$lang%u5b'Forum_view_not_confirmed'%u5d = 'Erlaube Gästen, das Forum einzusehen, selbst wenn es bestätigt werden muss';
#
#-----%u5b OPEN %u5d------------------------------------------
#
language/lang_english/lang_main.php
#
#-----%u5b FIND %u5d------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$lang%u5b'Topic_confirmation'%u5d = 'Confirmation';
$lang%u5b'Forum_confirmation_exist'%u5d = '
<b><i>%u5b This forum contains a confirmation topic! %u5d</i></b>';
$lang%u5b'Forum_confirmation_explain'%u5d = '
<b><i>%u5b You can enter a confirmation topic for this forum %u5d</i></b>';
$lang%u5b'Topic_confirmation_explain'%u5d = '
<b>%u5b To enter this forum you must first confirm the forum rules! %u5d</b>';
$lang%u5b'Confirm_time'%u5d = 'Confirmation Time';
$lang%u5b'Forum_confirm'%u5d = 'Forum Confirmation';
$lang%u5b'Forum_confirm_explain'%u5d = 'To enter the forum you must confirm the agreement above by clicking on this button%u3a';
$lang%u5b'No_confirms'%u5d = 'There are no confirmations';
$lang%u5b'Forum_confirm_stat_one'%u5d = '
%u5b %s user from total %s have confirmed this forum %u5d';
$lang%u5b'Forum_confirm_stat_more'%u5d = '
%u5b %s users from total %s have confirmed this forum %u5d';
$lang%u5b'Forum_confirmation_rules'%u5d = 'Without confirm the forum rules you can only view and read posts!';
#
#-----%u5b OPEN %u5d------------------------------------------
#
language/lang_german/lang_main.php
#
#-----%u5b FIND %u5d------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
// START Confirmation Topic
$lang%u5b'Topic_confirmation'%u5d = 'Bestätigung';
$lang%u5b'Forum_confirmation_exist'%u5d = '
<b><i>%u5b Dieses Forum beinhaltet ein Bestätigungstopic! %u5d</i></b>';
$lang%u5b'Forum_confirmation_explain'%u5d = '
<b><i>%u5b Für dieses Forum kannst Du eine Bestätigung erfassen %u5d</i></b>';
$lang%u5b'Topic_confirmation_explain'%u5d = '
<b>%u5b Um das Forum zu betreten, must Du zuerst die Foren-Regeln bestätigen! %u5d</b>';
$lang%u5b'Confirm_time'%u5d = 'Bestätigungszeit';
$lang%u5b'Forum_confirm'%u5d = 'Forenbestätigung';
$lang%u5b'Forum_confirm_explain'%u5d = 'Um das Forum betreten zu können, must Du die oben angeführte Erklärung mit einem Klick auf diesen Button bestätigen%u3a';
$lang%u5b'No_confirms'%u5d = 'Es sind keine Bestätigungen vorhanden';
$lang%u5b'Forum_confirm_stat_one'%u5d = '
%u5b %s Benutzer von insgesamt %s hat dieses Forum bestätigt %u5d';
$lang%u5b'Forum_confirm_stat_more'%u5d = '
%u5b %s Benutzer von insgesamt %s haben dieses Forum bestätigt %u5d';
$lang%u5b'Forum_confirmation_rules'%u5d = 'Ohne die Forumregeln zu bestätigen, kannst Du Beiträge nur ansehen und lesen!';
#
#-----%u5b OPEN %u5d------------------------------------------
#
index.php
#
#-----%u5b FIND %u5d------------------------------------------
#
// display the index
$display = display_index%u28$viewcatkey%u29;
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
//
// Get Confirmation Status for each forum
//
$forum_confirm = $topic_confirm = $confirmed_forums = array%u28%u29;
$forum_confirm = get_forum_confirmations%u28%u29;
$topic_confirm = get_topic_confirmations%u28%u29;
$confirmed_forums = explode%u28', ', $userdata%u5b'forum_confirm'%u5d%u29;
#
#-----%u5b OPEN %u5d--------------------------------------------------
#
posting.php
#
#-----%u5b FIND %u5d--------------------------------------------------
#
$topic_type = %u28 in_array%u28$topic_type, array%u28POST_NORMAL, POST_STICKY, POST_ANNOUNCE%u29%u29 %u29 ? $topic_type %u3a POST_NORMAL;
#
#-----%u5b IN-LINE FIND %u5d-----
#
POST_ANNOUNCE
#
#-----%u5b IN-LINE AFTER, ADD %u5d-----
#
, POST_CONFIRMATION
#
#-----%u5b AFTER, ADD %u5d--------------------------------------------------
#
// START - Confirmation Topic
$topic_confirm = %u28$topic_type == POST_CONFIRMATION%u29 ? POST_CONFIRMATION %u3a POST_NORMAL;
$topic_type = %u28$topic_type == POST_CONFIRMATION%u29 ? POST_NORMAL %u3a $topic_type;
// END - Confirmation Topic
#
#-----%u5b FIND %u5d--------------------------------------------------
#
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
#
#-----%u5b IN-LINE FIND %u5d--------------------------------------------------
#
t.topic_type
#
#-----%u5b IN-LINE AFTER, ADD %u5d--------------------------------------------------
#
, t.topic_confirm
#
#-----%u5b FIND %u5d--------------------------------------------------
#
else if %u28 $mode != 'newtopic' && $post_info%u5b'topic_status'%u5d == TOPIC_LOCKED && !$is_auth%u5b'auth_mod'%u5d%u29
%u7b
message_die%u28GENERAL_MESSAGE, $lang%u5b'Topic_locked'%u5d%u29;
%u7d
#
#-----%u5b AFTER, ADD %u5d--------------------------------------------------
#
// START - Confirmation Topic
$forum_confirm_exists = 0;
if %u28 $userdata%u5b'user_level'%u5d == ADMIN && $post_info%u5b'forum_confirm'%u5d == TRUE %u29
%u7b
$sql = "SELECT count%u28*%u29 as confirm FROM " . TOPICS_TABLE . "
WHERE forum_id = $forum_id
AND topic_confirm = " . POST_CONFIRMATION;
if %u28!$result = $db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not check for existing forum confirmation', '', __LINE__, __FILE__, $sql%u29;
%u7d
$row = $db->sql_fetchrow%u28$result%u29;
$forum_confirm_exists = %u28$row%u5b'confirm'%u5d != 0%u29 ? TRUE %u3a 0;
$db->sql_freeresult%u28$result%u29;
%u7d
// END - Confirmation Topic
#
#-----%u5b FIND %u5d--------------------------------------------------
#
$post_data%u5b'poster_id'%u5d = $post_info%u5b'poster_id'%u5d;
#
#-----%u5b AFTER, ADD %u5d--------------------------------------------------
#
// START - Confirmation Topic
$post_data%u5b'topic_confirm'%u5d = $post_info%u5b'topic_confirm'%u5d;
// END - Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
message_die%u28GENERAL_MESSAGE, sprintf%u28$lang%u5b'Sorry_' . $is_auth_type%u5d, $is_auth%u5b$is_auth_type . "_type"%u5d%u29%u29;
#
#-----%u5b REPLACE WITH %u5d------------------------------------------
#
// START - Confirmation Topic
$confirmed_forums = $forum_confirm = $topic_confirm = array%u28%u29;
$forum_confirm = get_forum_confirmations%u28$forum_id%u29;
$topic_confirm = get_topic_confirmations%u28$forum_id%u29;
$confirmed_forums = explode%u28',', $userdata%u5b'forum_confirm'%u5d%u29;
$auth_missing_string = sprintf%u28$lang%u5b'Sorry_' . $is_auth_type%u5d, $is_auth%u5b$is_auth_type . "_type"%u5d%u29;
$auth_missing_string = %u28in_array%u28$forum_id, $forum_confirm%u29 && in_array%u28$forum_id, $topic_confirm%u29 && !in_array%u28$forum_id, $confirmed_forums%u29 && $userdata%u5b'user_level'%u5d == USER%u29 ? $lang%u5b'Forum_confirmation_rules'%u5d %u3a $auth_missing_string;
message_die%u28GENERAL_MESSAGE, $auth_missing_string%u29;
// END - Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
$poll_title = %u28 isset%u28$HTTP_POST_VARS%u5b'poll_title'%u5d%u29 && $is_auth%u5b'auth_pollcreate'%u5d %u29 ? $HTTP_POST_VARS%u5b'poll_title'%u5d %u3a '';
$poll_options = %u28 isset%u28$HTTP_POST_VARS%u5b'poll_option_text'%u5d%u29 && $is_auth%u5b'auth_pollcreate'%u5d %u29 ? $HTTP_POST_VARS%u5b'poll_option_text'%u5d %u3a '';
$poll_length = %u28 isset%u28$HTTP_POST_VARS%u5b'poll_length'%u5d%u29 && $is_auth%u5b'auth_pollcreate'%u5d %u29 ? $HTTP_POST_VARS%u5b'poll_length'%u5d %u3a '';
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
if %u28$forum_confirm_exists == POST_CONFIRMATION%u29
%u7b
$poll_title = '';
$poll_options = '';
$poll_length = '';
%u7d
else
%u7b
#
#-----%u5b FIND %u5d------------------------------------------
#
$bbcode_uid = '';
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
%u7d
#
#-----%u5b FIND %u5d--------------------------------------------------
#
submit_post%u28$mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace%u28"\'", "''", $username%u29, str_replace%u28"\'", "''", $subject%u29, str_replace%u28"\'", "''", $message%u29, str_replace%u28"\'", "''", $poll_title%u29, $poll_options, $poll_length%u29;
#
#-----%u5b IN-LINE FIND %u5d--------------------------------------------------
#
$topic_type
#
#-----%u5b IN-LINE AFTER, ADD %u5d--------------------------------------------------
#
, $topic_confirm
#
#-----%u5b FIND %u5d------------------------------------------
#
$poll_title = %u28 !empty%u28$HTTP_POST_VARS%u5b'poll_title'%u5d%u29 %u29 ? htmlspecialchars%u28trim%u28stripslashes%u28$HTTP_POST_VARS%u5b'poll_title'%u5d%u29%u29%u29 %u3a '';
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
if %u28$forum_confirm_exists != POST_CONFIRMATION%u29
%u7b
#
#-----%u5b FIND %u5d------------------------------------------
#
if %u28 isset%u28$poll_add%u29 && !empty%u28$HTTP_POST_VARS%u5b'add_poll_option_text'%u5d%u29 %u29
%u7b
$poll_options%u5b%u5d = htmlspecialchars%u28trim%u28stripslashes%u28$HTTP_POST_VARS%u5b'add_poll_option_text'%u5d%u29%u29%u29;
%u7d
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
%u7d
#
#-----%u5b FIND %u5d--------------------------------------------------
#
$template->assign_block_vars%u28'switch_type_toggle', array%u28%u29%u29;
#
#-----%u5b AFTER, ADD %u5d--------------------------------------------------
#
// START - Confirmation Topic
if%u28 $forum_confirm_exists == 0 && %u28$mode == 'newtopic' || $mode == 'editpost'%u29 && $userdata%u5b'user_level'%u5d == ADMIN || $post_data%u5b'topic_confirm'%u5d == TRUE %u29
%u7b
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_CONFIRMATION . '"';
if %u28 $post_data%u5b'topic_confirm'%u5d == POST_CONFIRMATION || $topic_confirm == POST_CONFIRMATION %u29
%u7b
$topic_type_toggle .= ' checked="checked"';
%u7d
$topic_type_toggle .= ' /> ' . $lang%u5b'Topic_confirmation'%u5d . ' ';
%u7d
// END - Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
if%u28 %u28 $mode == 'newtopic' || %u28 $mode == 'editpost' && $post_data%u5b'edit_poll'%u5d%u29 %u29 && $is_auth%u5b'auth_pollcreate'%u5d %u29
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
$is_auth%u5b'auth_pollcreate'%u5d
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
&& $forum_confirm_exists != POST_CONFIRMATION
#
#-----%u5b OPEN %u5d------------------------------------------
#
search.php
#
#-----%u5b FIND %u5d------------------------------------------
#
//
// Search ID Limiter, decrease this value if you experience further timeout problems with searching forums
$limiter = 5000;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
//
// Catch all post id from confirmation topics
$exclude_post_ids = '';
$sql = "SELECT p.post_id FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.topic_id = p.topic_id
AND t.topic_first_post_id = p.post_id
AND t.topic_confirm = " . POST_CONFIRMATION;
if %u28!$result = $db->sql_query%u28$sql%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not fetch confirmation ids', '', __LINE__, __FILE__, $sql%u29;
%u7d
while %u28$row = $db->sql_fetchrow%u28$result%u29%u29
%u7b
$exclude_post_ids .= %u28$exclude_post_ids != ''%u29 ? ','.$row%u5b'post_id'%u5d %u3a $row%u5b'post_id'%u5d;
%u7d
$db->sql_freeresult%u28$result%u29;
$exclude_post_ids = %u28$exclude_post_ids == ''%u29 ? 0 %u3a $exclude_post_ids;
#
#-----%u5b FIND %u5d------------------------------------------
#
if %u28 !%u28$result = $db->sql_query%u28$sql%u29%u29 %u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not obtain matched posts list', '', __LINE__, __FILE__, $sql%u29;
%u7d
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
$sql .= %u28$exclude_post_ids != ''%u29 ? ' AND post_id NOT IN %u28' . $exclude_post_ids . '%u29' %u3a '';
#
#-----%u5b FIND %u5d------------------------------------------
#
$sql = "SELECT m.post_id
FROM " . SEARCH_WORD_TABLE . " w, " . SEARCH_MATCH_TABLE . " m
WHERE w.word_text LIKE '$match_word'
AND m.word_id = w.word_id
AND w.word_common <> 1
$search_msg_only";
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
AND w.word_common <> 1
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
AND m.post_id NOT IN %u28$exclude_post_ids%u29
#
#-----%u5b FIND %u5d------------------------------------------
#
$sql = "SELECT post_id
FROM " . POSTS_TEXT_TABLE . "
WHERE post_text LIKE '$match_word'
$search_msg_only";
-------------------****DUDA AQUI, ENCONTRE ESTO*****-------------------------
$sql = "SELECT pt.post_id
FROM " . POSTS_TEXT_TABLE . "
pt " . %u28%u28$only_bluecards%u29 ? ','.POSTS_TABLE . ' p ' %u3a ''%u29 . "
WHERE pt.post_text LIKE '$match_word'
$search_msg_only";
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
WHERE post_text LIKE '$match_word'
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
AND post_id NOT IN %u28$exclude_post_ids%u29
#
#-----%u5b FIND %u5d------------------------------------------
#
if %u28 !%u28$result = $db->sql_query%u28$sql%u29%u29 %u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not obtain post ids', '', __LINE__, __FILE__, $sql%u29;
%u7d
$search_ids = array%u28%u29;
while%u28 $row = $db->sql_fetchrow%u28$result%u29 %u29
%u7b
$search_ids%u5b%u5d = $row%u5b'topic_id'%u5d;
%u7d
$db->sql_freeresult%u28$result%u29;
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
$sql .= ' AND ' . %u28%u28$auth_sql != ''%u29 ? 't.' %u3a ''%u29 . 'topic_confirm <> ' . POST_CONFIRMATION;
#
#-----%u5b FIND %u5d------------------------------------------
#
$per_page = %u28 $show_results == 'posts' %u29 ? $board_config%u5b'posts_per_page'%u5d %u3a $board_config%u5b'topics_per_page'%u5d;
$sql .= " ORDER BY ";
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
$sql .= ' AND t.topic_confirm <> ' . POST_CONFIRMATION;
#
#-----%u5b OPEN %u5d------------------------------------------
#
viewforum.php
#
#-----%u5b FIND %u5d------------------------------------------
#
// get the forum row
$forum_row = $tree%u5b'data'%u5d%u5b $tree%u5b'keys'%u5d%u5b POST_FORUM_URL . $forum_id %u5d %u5d;
if %u28 empty%u28$forum_row%u29 %u29
%u7b
message_die%u28GENERAL_MESSAGE, 'Forum_not_exist'%u29;
%u7d
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
// Read confirmations and check if user have still confirmed this forum
$forum_confirm = %u28$forum_row%u5b'forum_confirm'%u5d == TRUE%u29 ? TRUE %u3a 0;
if %u28$userdata%u5b'session_logged_in'%u5d == TRUE && $userdata%u5b'user_level'%u5d == USER && $forum_confirm == TRUE%u29
%u7b
$topic_confirm = $confirmed_forums = array%u28%u29;
$topic_confirm = get_topic_confirmations%u28$forum_id%u29;
$confirmed_forums = explode%u28', ', $userdata%u5b'forum_confirm'%u5d%u29;
if %u28!in_array%u28$forum_id, $confirmed_forums%u29 && in_array%u28$forum_id, $topic_confirm%u29%u29
%u7b
$topic_id = get_topic_confirm_id%u28$forum_id%u29;
redirect%u28append_sid%u28"viewtopic_confirm.$phpEx?".POST_TOPIC_URL."=".$topic_id%u29%u29;
%u7d
%u7d
// END Confirmation Topic
#
#-----%u5b FIND %u5d------------------------------------------
#
$sql = "SELECT COUNT%u28t.topic_id%u29 AS forum_topics
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE t.forum_id = $forum_id
AND p.post_id = t.topic_last_post_id
AND p.post_time >= $min_topic_time";
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
$sql .= %u28$forum_confirm == TRUE%u29 ? ' AND t.topic_confirm <> '.POST_CONFIRMATION %u3a '';
#
#-----%u5b FIND %u5d------------------------------------------
#
//
// Grab all the basic data %u28all topics except announcements%u29
// for this forum
//
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
$sql_confirm_where = %u28$forum_confirm == TRUE%u29 ? ' AND t.topic_confirm <> '.POST_CONFIRMATION %u3a '';
#
#-----%u5b FIND %u5d------------------------------------------
#
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_first_post_id
AND p2.post_id = t.topic_last_post_id
AND u2.user_id = p2.poster_id
AND t.topic_type <> " . POST_ANNOUNCE . "
$limit_topics_time
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
LIMIT $start, ".$board_config%u5b'topics_per_page'%u5d;
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
$limit_topics_time
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
$sql_confirm_where
#
#-----%u5b FIND %u5d------------------------------------------
#
//
// Total topics ...
//
$total_topics += $total_announcements;
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
if %u28$forum_confirm == TRUE%u29
%u7b
$topic_confirm_id = get_topic_confirm_id%u28$forum_id%u29;
if %u28intval%u28$topic_confirm_id%u29 != 0%u29
%u7b
$confirm_time = %u28$userdata%u5b'forum_confirm_time'%u5d%u5b$forum_id%u5d != ''%u29 ? sprintf%u28$lang%u5b'Forum_confirm_time'%u5d, create_date%u28$userdata%u5b'user_dateformat'%u5d, $userdata%u5b'forum_confirm_time'%u5d%u5b$forum_id%u5d, $userdata%u5b'user_timezone'%u5d%u29%u29 %u3a '';
$confirm_stat = '';
if %u28$userdata%u5b'user_level'%u5d == MOD || $userdata%u5b'user_level'%u5d == ADMIN%u29
%u7b
$sql = "SELECT count%u28user_id%u29 AS total FROM " . USERS_TABLE . "
WHERE user_level = " . USER . "
AND user_active = " . TRUE;
if %u28$result = $db->sql_query%u28$sql%u29%u29
%u7b
$row = $db->sql_fetchrow%u28$result%u29;
$total_users = intval%u28$row%u5b'total'%u5d%u29;
%u7d
$sql = "SELECT count%u28user_id%u29 as total FROM " . FORUMS_CONFIRM_TABLE . "
WHERE forum_id = $forum_id";
if %u28$result = $db->sql_query%u28$sql%u29%u29
%u7b
$row = $db->sql_fetchrow%u28$result%u29;
$total_confirms = intval%u28$row%u5b'total'%u5d%u29;
%u7d
$forum_confirm_stat_string = %u28$total_confirms < 2%u29 ? $lang%u5b'Forum_confirm_stat_one'%u5d %u3a $lang%u5b'Forum_confirm_stat_more'%u5d;
$confirm_stat = sprintf%u28$forum_confirm_stat_string, $total_confirms, $total_users%u29;
%u7d
$template->assign_block_vars%u28'confirm_topic', array%u28
'L_CONFIRM_TOPIC' => $lang%u5b'Forum'%u5d.' '.$lang%u5b'Topic_confirmation'%u5d,
'CONFIRM_TIME' => $confirm_time,
'CONFIRM_STAT' => $confirm_stat,
'U_CONFIRM_TOPIC' => append_sid%u28"viewtopic.$phpEx?".POST_TOPIC_URL."=".$topic_confirm_id%u29%u29
%u29;
%u7d
%u7d
// END Confirmation Topic
#
#-----%u5b OPEN %u5d------------------------------------------
#
viewtopic.php
#
#-----%u5b FIND %u5d------------------------------------------
#
$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 . "
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
t.topic_status
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
, t.topic_confirm
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
f.forum_status
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
, f.forum_confirm
#
#-----%u5b FIND %u5d------------------------------------------
#
//
// End session management
//
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
// START Confirmation Topic
// Read confirmations and check if user have still confirmed this forum
if %u28$forum_topic_data%u5b'forum_confirm'%u5d == TRUE%u29
%u7b
$topic_confirm_id = get_topic_confirm_id%u28$forum_id%u29;
if %u28$userdata%u5b'session_logged_in'%u5d == TRUE && $userdata%u5b'user_level'%u5d == USER%u29
%u7b
$topic_confirm = $confirmed_forums = array%u28%u29;
$topic_confirm = get_topic_confirmations%u28$forum_id%u29;
$confirmed_forums = explode%u28', ', $userdata%u5b'forum_confirm'%u5d%u29;
if %u28!in_array%u28$forum_id, $confirmed_forums%u29 && in_array%u28$forum_id, $topic_confirm%u29%u29
%u7b
redirect%u28append_sid%u28"viewtopic_confirm.$phpEx?".POST_TOPIC_URL."=".$topic_confirm_id%u29%u29;
%u7d
%u7d
if %u28$forum_topic_data%u5b'topic_id'%u5d == $topic_confirm_id%u29
%u7b
redirect%u28append_sid%u28"viewtopic_confirm.$phpEx?".POST_TOPIC_URL."=".$topic_confirm_id%u29%u29;
%u7d
%u7d
// END Confirmation Topic
#
#-----%u5b OPEN %u5d------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----%u5b FIND %u5d------------------------------------------
#
<tr>
<td class="row1">%u7bL_ENABLE_PRUNE%u7d</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" %u7bPRUNE_YES%u7d /> %u7bL_YES%u7d <input type="radio" name="prune_enable" value="0" %u7bPRUNE_NO%u7d /> %u7bL_NO%u7d</td>
</tr>
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
<tr>
<td class="row1">%u7bL_NO_CONFIRM_VIEW%u7d</td>
<td class="row2"><input type="radio" name="no_confirm_view" value="1" %u7bNO_CONFIRM_VIEW_YES%u7d /> %u7bL_YES%u7d <input type="radio" name="no_confirm_view" value="0" %u7bNO_CONFIRM_VIEW_NO%u7d /> %u7bL_NO%u7d</td>
</tr>
#
#-----%u5b OPEN %u5d------------------------------------------
#
templates/subSilver/admin/forum_edit_body.tpl
#
#-----%u5b FIND %u5d------------------------------------------
#
<tr>
<td class="row1">%u7bL_FORUM_STATUS%u7d</td>
<td class="row2"><select name="forumstatus">%u7bS_STATUS_LIST%u7d</select></td>
</tr>
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
<tr>
<td class="row1">%u7bL_FORUM_CONFIRM%u7d
<span class="gensmall">%u7bL_FORUM_CONFIRM_EXPLAIN%u7d</span></td>
<td class="row2"><input type="radio" name="forum_confirm" value="1" class="post" %u7bFORUM_CONFIRM_YES%u7d /> %u7bL_YES%u7d
<input type="radio" name="forum_confirm" value="0" class="post" %u7bFORUM_CONFIRM_NO%u7d /> %u7bL_NO%u7d</td>
</tr>
#
#-----%u5b OPEN %u5d------------------------------------------
#
templates/subSilver/index_box.tpl
#
#-----%u5b FIND %u5d------------------------------------------
#
<span class="forumlink"><a href="%u7bcatrow.forumrow.U_VIEWFORUM%u7d" class="forumlink">%u7bcatrow.forumrow.FORUM_NAME%u7d</a>
</span>
<span class="genmed">%u7bcatrow.forumrow.FORUM_DESC%u7d</span>
<span class="gensmall">%u7bcatrow.forumrow.L_MODERATOR%u7d%u7bcatrow.forumrow.MODERATORS%u7d%u7bcatrow.forumrow.L_LINKS%u7d%u7bcatrow.forumrow.LINKS%u7d</span>
#
#-----%u5b IN-LINE FIND %u5d------------------------------------------
#
%u7bcatrow.forumrow.FORUM_DESC%u7d
#
#-----%u5b IN-LINE AFTER, ADD %u5d------------------------------------------
#
%u7bcatrow.forumrow.FORUM_CONFIRMATIONS%u7d%u7bcatrow.forumrow.TOPIC_CONFIRMATIONS%u7d
#
#-----%u5b OPEN %u5d------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----%u5b FIND %u5d------------------------------------------
#
<tr>
<td align="left" valign="middle" class="nav" width="100%"><span class="nav"><a href="%u7bU_INDEX%u7d" class="nav">%u7bL_INDEX%u7d</a>%u7bNAV_CAT_DESC%u7d</span></td>
</tr>
</table>
#
#-----%u5b BEFORE, ADD %u5d------------------------------------------
#
<!-- BEGIN confirm_topic -->
<tr>
<td class="catbottom" align="center" colspan="3">
<span class="gen">»» <a href="%u7bconfirm_topic.U_CONFIRM_TOPIC%u7d" class="nav">%u7bconfirm_topic.L_CONFIRM_TOPIC%u7d</a> ««</span>
<span class="gensmall">%u7bconfirm_topic.CONFIRM_TIME%u7d</span>
<span class="gensmall">%u7bconfirm_topic.CONFIRM_STAT%u7d</span>
</td>
</tr>
<!-- END confirm_topic -->
#
#-----%u5b SAVE/CLOSE ALL FILES %u5d------------------------------------------
#
# EoMCode: Alles auswählen
#
#-----%u5b OPEN %u5d------------------------------------------
#
includes/functions.php
#
#-----%u5b FIND %u5d------------------------------------------
#
function get_db_stat%u28$mode%u29
%u7b
global $board_config, $db;Code: Alles auswählen
function get_db_stat%u28$mode%u29
%u7b
global $db;Code: Alles auswählen
#
#-----%u5b AFTER, ADD %u5d------------------------------------------
#
global $userdata;Code: Alles auswählen
#
#-----%u5b FIND %u5d------------------------------------------
#
$match_word = addslashes%u28'%' . str_replace%u28'*', '', $split_search%u5b$i%u5d%u29 . '%'%u29;
$search_msg_only = %u28 $search_fields %u29 ? "OR post_subject LIKE '$match_word'" %u3a '';
$sql = "SELECT post_id
FROM " . POSTS_TEXT_TABLE . "
WHERE post_text LIKE '$match_word'
$search_msg_only";Code: Alles auswählen
$match_word = addslashes%u28'%' . str_replace%u28'*', '', $split_search%u5b$i%u5d%u29 . '%'%u29;
$search_msg_only = %u28 $search_fields %u29 ? "OR pt.post_subject LIKE '$match_word'" %u3a '';
$search_msg_only .= %u28$only_bluecards%u29 ? " AND p.post_bluecard>0 AND pt.post_id=p.post_id " %u3a "";
$sql = "SELECT pt.post_id
FROM " . POSTS_TEXT_TABLE . "
pt " . %u28%u28$only_bluecards%u29 ? ','.POSTS_TABLE . ' p ' %u3a ''%u29 . "
WHERE pt.post_text LIKE '$match_word'
$search_msg_only";Code: Alles auswählen
$sql = "SELECT pt.post_id, p.forum_id
FROM " . POSTS_TEXT_TABLE . " pt, " . POSTS_TABLE . " p
WHERE pt.post_text LIKE '$match_word'
AND p.post_id = pt.post_idCode: Alles auswählen
//
// Start auth check
//
$is_auth = array%u28%u29;
//-- mod %u3a categories hierarchy --------------------------------------------------------------------
//-- delete
// $is_auth = auth%u28AUTH_ALL, $forum_id, $userdata, $forum_row%u29;
//-- add
$is_auth = $tree%u5b'auth'%u5d%u5bPOST_FORUM_URL . $forum_id%u5d;
//-- fin mod %u3a categories hierarchy ----------------------------------------------------------------Code: Alles auswählen
// Check forum confirmation for the current forum
$mode = %u28isset%u28$HTTP_GET_VARS%u5b'mode'%u5d%u29%u29 ? $HTTP_GET_VARS%u5b'mode'%u5d %u3a '';
if %u28$mode == 'confirm_view'%u29
%u7b
$sql = "SELECT forum_confirm_id FROM " . FORUMS_TABLE . "
WHERE forum_id = $forum_id";
if %u28!%u28$result = $db->sql_query%u28$sql%u29%u29%u29
%u7b
message_die%u28GENERAL_ERROR, 'Could not display the confirmation for this forum', '', __LINE__, __FILE__, $sql%u29;
%u7d
$row = $db->sql_fetchrow%u28$result%u29;
$forum_confirm_id = $row%u5b'forum_confirm_id'%u5d;
$db->sql_freeresult%u28$result%u29;
if %u28intval%u28$forum_confirm_id%u29 != 0%u29
%u7b
$gen_simple_header = TRUE;
include%u28$phpbb_root_path . 'includes/page_header.'.$phpEx%u29;
create_confirm_preview%u28$forum_confirm_id%u29;
include%u28$phpbb_root_path . 'includes/page_tail.'.$phpEx%u29;
%u7d
%u7d
$forum_confirm = build_user_confirm_status%u28$forum_id%u29;
$confirm_forum = get_forum_confirm%u28%u29;
if %u28$confirm_forum%u5b$forum_id%u5d != 0%u29
%u7b
if %u28$forum_confirm%u29
%u7b
$template->assign_block_vars%u28'confirm_topic', array%u28
'L_CONFIRM_TOPIC' => $lang%u5b'Forum_confirm_header'%u5d,
'U_CONFIRM_TOPIC' => append_sid%u28"viewforum.$phpEx?".POST_FORUM_URL."=$forum_id&mode=confirm_view"%u29,
'CONFIRM_STAT' => get_forum_confirm_stat%u28$forum_id%u29%u29
%u29;
%u7d
else
%u7b
redirect%u28append_sid%u28"forum_confirm.$phpEx?".POST_FORUM_URL."=$forum_id"%u29%u29;
%u7d
%u7d
// End Confirmation CheckCode: Alles auswählen
//
// Start auth check
//
$is_auth = array%u28%u29;
//-- mod %u3a categories hierarchy --------------------------------------------------------------------
//-- delete
// $is_auth = auth%u28AUTH_ALL, $forum_id, $userdata, $forum_topic_data%u29;
//
// if%u28 !$is_auth%u5b'auth_view'%u5d || !$is_auth%u5b'auth_read'%u5d %u29
//-- add
$is_auth = $tree%u5b'auth'%u5d%u5bPOST_FORUM_URL . $forum_id%u5d;
if %u28 !$is_auth%u5b'auth_read'%u5d %u29
//-- fin mod %u3a categories hierarchy ----------------------------------------------------------------Code: Alles auswählen
// Check forum confirmation for the current forum
$forum_confirm = build_user_confirm_status%u28$forum_id%u29;
if %u28!$forum_confirm%u29
%u7b
redirect%u28append_sid%u28"forum_confirm.$phpEx?".POST_FORUM_URL."=$forum_id"%u29%u29;
%u7d
// End Confirmation CheckYes. Sorry...So I will have to uninstall everythingand re-install it again.?
Install on function_topics_post.php instead viewforum.php and use topics_list_body.tpl instead viewforum.tpl for the parts you can't find in the files the mod ask you to install on...
Code: Alles auswählen
CREATE TABLE phpbb_forum_confirmation %u28
forum_id SMALLINT%u285%u29 UNSIGNED NOT NULL DEFAULT '0',
user_id MEDIUMINT%u288%u29 NOT NULL DEFAULT '0',
confirm_time INT%u2811%u29 NOT NULL DEFAULT '0',
KEY %u28forum_id, user_id%u29
%u29;
ALTER TABLE phpbb_forums ADD COLUMN forum_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL AFTER forum_topics;
ALTER TABLE phpbb_topics ADD COLUMN topic_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL;
INSERT INTO phpbb_config %u28config_name, config_value%u29 VALUES %u28'no_confirm_view', '0'%u29;Code: Alles auswählen
CREATE TABLE phpbb_forum_confirmation %u28
forum_id SMALLINT%u285%u29 UNSIGNED NOT NULL DEFAULT '0',
user_id MEDIUMINT%u288%u29 NOT NULL DEFAULT '0',
confirm_time INT%u2811%u29 NOT NULL DEFAULT '0',
KEY %u28forum_id, user_id%u29
%u29;
ALTER TABLE phpbb_forums ADD COLUMN forum_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL AFTER forum_topics;
ALTER TABLE phpbb_topics ADD COLUMN topic_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL;
INSERT INTO phpbb_config %u28config_name, config_value%u29 VALUES %u28'no_confirm_view', '0'%u29;Code: Alles auswählen
DROP TABLE tablename;Code: Alles auswählen
ALTER TABLE tablename DROP FIELD fieldname;Code: Alles auswählen
DELETE from tablename WHERE conditions;Code: Alles auswählen
DROP TABLE phpbb_forum_confirmation;
ALTER TABLE phpbb_forums DROP FIELD forum_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL AFTER forum_topics;
ALTER TABLE phpbb_topics DROP FIELD topic_confirm TINYINT%u281%u29 DEFAULT '0' NOT NULL;
DELETE from phpbb_config %u28config_name, config_value%u29 VALUES %u28'no_confirm_view', '0'%u29;Code: Alles auswählen
ALTER TABLE phpbb_forums ADD COLUMN forum_confirm TINYINT(1) DEFAULT '0' NOT NULL AFTER forum_topics;
ALTER TABLE phpbb_topics ADD COLUMN topic_confirm TINYINT(1) DEFAULT '0' NOT NULL;Code: Alles auswählen
ALTER TABLE phpbb_forums DROP FIELD forum_confirm TINYINT(1) DEFAULT '0' NOT NULL AFTER forum_topics;
ALTER TABLE phpbb_topics DROP FIELD topic_confirm TINYINT(1) DEFAULT '0' NOT NULL;Code: Alles auswählen
DROP TABLE phpbb_forum_confirmation;
ALTER TABLE phpbb_forums DROP COLUMNS forum_confirm TINYINT(1) DEFAULT '0' NOT NULL AFTER forum_topics;
ALTER TABLE phpbb_topics DROP COLUMNS topic_confirm TINYINT(1) DEFAULT '0' NOT NULL;
DELETE from phpbb_config (config_name, config_value) VALUES ('no_confirm_view', '0');Code: Alles auswählen
DELETE from phpbb_config (config_name, config_value) VALUES ('no_confirm_view', '0');Code: Alles auswählen
INSERT INTO phpbb_config (config_name, config_value) VALUES ('no_confirm_view', '0');