###############################################
## Hack Title: Password-protected topics
## Hack Version: 0.2
## Author: Freakin' Booty ;-P
## Description: Protect a topic from being viewed without a password. A password will have to be entered
## if one wants to enter the topic.
## Compatibility: 2.0.4 - 2.0.6
##
## Installation Level: Easy
## Installation Time: 10 - 20 minutes
## Files To Edit: 9
## modcp.php
## posting.php
## search.php
## viewtopic.php
## includes/functions.php
## includes/functions_post.php
## includes/sessions.php
## language/lang_english/lang_main.php
## templates/subSilver/posting_body.tpl
##
## Included Files: 2
## db_update.php
## templates/subSilver/password_body.tpl
##
## History:
## 0.2: Added extra security, flushing all passwords when the user logs in / logs out.
## Fixed a major bug where the topics and posts could be read using the search function.
## 0.1: Initial release
##
## Author Notes:
## - If you have Password-protected Forums (0.4 or above) already installed, some code will already be
## present. Be sure to use the install file "upgrade from Password-protected Forums x.x".
## Doing the upgrade will also make sure you get the latest version of Password-protected Forums.
## - The cookie for each topic expires after each session. This means users have to supply the password
## every time they visit the board. A session expires when you log in, log out, quit your browser or
## leave the website.
##
## Support:
http://www.phpbbhacks.com/forums
## Copyright: ©2003 Password-protected topics 0.2 - Freakin' Booty ;-P
##
###############################################
## 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.
###############################################
#
#-----[ COPY ]--------------------------------------------
#
# Run this file once as administrator and then delete it
#
db_update.php => db_update.php
#
#-----[ COPY ]--------------------------------------------
#
# Make sure to create a similar file for every template installed
#
templates/subSilver/password_body.tpl => templates/subSilver/password_body.tpl
#
#-----[ OPEN ]--------------------------------------------
#
modcp.php
#
#-----[ FIND ]--------------------------------------------
#
$sql = "SELECT poster_id, COUNT(post_id) AS posts
FROM " . POSTS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
GROUP BY poster_id";
#
#-----[ REPLACE WITH ]-------------------------------------
#
//
// Check for password-protected topics
//
if( $userdata['user_level'] != ADMIN )
{
$sql = "SELECT topic_id FROM " . TOPICS_TABLE . " WHERE topic_id IN ($topic_id_sql) AND topic_password = ''";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic list', '', __LINE__, __FILE__, $sql);
}
$topic_id_sql = '';
while( $row = $db->sql_fetchrow($result) )
{
$topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . $row['topic_id'];
}
}
if( $topic_id_sql == '' )
{
message_die(GENERAL_MESSAGE, $lang['Not_delete_password_topics']);
}
else
{
$sql = "SELECT poster_id, COUNT(post_id) AS posts
FROM " . POSTS_TABLE . "
WHERE topic_id IN ($topic_id_sql)
GROUP BY poster_id";
}
#
#-----[ OPEN ]--------------------------------------------
#
posting.php
#
#-----[ FIND ]--------------------------------------------
#
$sql = "SELECT f.*, t.topic_status, t.topic_title
FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
#
#-----[ INLINE, FIND ]------------------------------------
#
, t.topic_title
#
#-----[ AFTER, ADD ]--------------------------------------
#
, t.topic_password
#
#-----[ FIND ]--------------------------------------------
#
$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 . "
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
#
#-----[ INLINE, FIND ]------------------------------------
#
, t.topic_vote
#
#-----[ AFTER, ADD ]--------------------------------------
#
, t.topic_password
#
#-----[ FIND ]--------------------------------------------
#
if ( $mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete' )
{
#
#-----[ BEFORE, ADD ]-------------------------------------
#
$show_password_box = ( $mode == 'newtopic' || ($mode == 'editpost' && $post_info['topic_first_post_id'] == $post_id) ) ? TRUE : 0;
if( $userdata['user_level'] != ADMIN && ($mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete') && $post_info['topic_first_post_id'] == $post_id )
{
message_die(GENERAL_MESSAGE, $lang['Not_auth_edit_topic']);
}
#
#-----[ FIND ]--------------------------------------------
#
//
// Set toggles for various options
//
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Password check
//
if( !$is_auth['auth_mod'] && $userdata['user_level'] != ADMIN )
{
$redirect = str_replace("&", "&", preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($HTTP_SERVER_VARS['REQUEST_URI'])));
if( $HTTP_POST_VARS['cancel'] )
{
redirect(append_sid("index.$phpEx"));
}
else if( $HTTP_POST_VARS['pass_login'] )
{
if( $post_info['topic_password'] != '' )
{
password_check('topic', $topic_id, $HTTP_POST_VARS['password'], $redirect);
}
else if( $post_info['forum_password'] != '' )
{
password_check('forum', $forum_id, $HTTP_POST_VARS['password'], $redirect);
}
}
if( $post_info['topic_password'] != '' && $mode != 'newtopic' )
{
$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) : '';
if( $passdata[$topic_id] != md5($post_info['topic_password']) )
{
password_box('topic', $redirect);
}
}
else if( $post_info['forum_password'] != '' )
{
$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass'])) : '';
if( $passdata[$forum_id] != md5($post_info['forum_password']) )
{
password_box('forum', $redirect);
}
}
}
//
// END: Password check
//
#
#-----[ FIND ]--------------------------------------------
#
case 'reply':
$username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : '';
$subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : '';
$message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';
#
#-----[ AFTER, ADD ]--------------------------------------
#
$topic_password = ( !empty($HTTP_POST_VARS['topicpassword']) ) ? $HTTP_POST_VARS['topicpassword'] : '';
#
#-----[ FIND ]--------------------------------------------
#
prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
#
#-----[ INLINE, FIND ]------------------------------------
#
, $poll_length
#
#-----[ AFTER, ADD ]--------------------------------------
#
, $topic_password
#
#-----[ FIND ]--------------------------------------------
#
submit_post($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("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
#
#-----[ INLINE, FIND ]------------------------------------
#
, $poll_length
#
#-----[ AFTER, ADD ]--------------------------------------
#
, $topic_password
#
#-----[ FIND ]--------------------------------------------
#
$message = ( !empty($HTTP_POST_VARS['message']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['message']))) : '';
#
#-----[ AFTER, ADD ]--------------------------------------
#
$topic_password = ( !empty($HTTP_POST_VARS['topicpassword']) ) ? trim($HTTP_POST_VARS['topicpassword']) : '';
#
#-----[ FIND ]--------------------------------------------
#
$poll_length = '';
#
#-----[ AFTER, ADD ]--------------------------------------
#
$topic_password = '';
#
#-----[ FIND ]--------------------------------------------
#
$subject = ( $post_data['first_post'] ) ? $post_info['topic_title'] : $post_info['post_subject'];
$message = $post_info['post_text'];
#
#-----[ AFTER, ADD ]--------------------------------------
#
$topic_password = ($post_data['first_post'] ) ? $post_info['topic_password'] : '';
#
#-----[ FIND ]--------------------------------------------
#
$template->assign_block_vars('switch_not_privmsg', array());
#
#-----[ AFTER, ADD ]--------------------------------------
#
//
// Topic password
//
if( $show_password_box && $userdata['user_level'] == ADMIN )
{
$template->assign_block_vars('switch_password_box', array());
}
#
#-----[ FIND ]--------------------------------------------
#
'MESSAGE' => $message,
#
#-----[ AFTER, ADD ]--------------------------------------
#
'TOPIC_PASSWORD' => $topic_password,
#
#-----[ FIND ]--------------------------------------------
#
'L_MESSAGE_BODY' => $lang['Message_body'],
#
#-----[ AFTER, ADD ]--------------------------------------
#
'L_TOPIC_PASSWORD' => $lang['Topic_password'],
#
#-----[ OPEN ]--------------------------------------------
#
search.php
#
#-----[ FIND ]--------------------------------------------
#
while ($row = $db->sql_fetchrow($result))
{
$search_ids[] = $row['topic_id'];
}
#
#-----[ REPLACE WITH ]------------------------------------
#
$passdata = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) : '';
while ($row = $db->sql_fetchrow($result))
{
$sql = 'SELECT topic_password FROM ' . TOPICS_TABLE . ' WHERE topic_id = ' . $row['topic_id'];
if(!$pass_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not retrieve topic password information', '', __LINE__, __FILE__, $sql);
}
$pass_row = $db->sql_fetchrow($pass_result);
$db->sql_freeresult($pass_result);
if($pass_row['topic_password'] != '' && $passdata[$row['topic_id']] != md5($pass_row['topic_password']))
{
}
else
{
$search_ids[] = $row['topic_id'];
}
}
#
#-----[ FIND ]--------------------------------------------
#
$search_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$search_ids[] = $row['topic_id'];
}
#
#-----[ REPLACE WITH ]------------------------------------
#
$passdata = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) : '';
$search_ids = array();
while( $row = $db->sql_fetchrow($result) )
{
$sql = 'SELECT topic_password FROM ' . TOPICS_TABLE . ' WHERE topic_id = ' . $row['topic_id'];
if(!$pass_result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not retrieve topic password information', '', __LINE__, __FILE__, $sql);
}
$pass_row = $db->sql_fetchrow($pass_result);
$db->sql_freeresult($pass_result);
if($pass_row['topic_password'] != '' && $passdata[$row['topic_id']] != md5($pass_row['topic_password']))
{
}
else
{
$search_ids[] = $row['topic_id'];
}
}
#
#-----[ 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 . "
#
#-----[ INLINE, FIND ]------------------------------------
#
, t.topic_last_post_id
#
#-----[ AFTER, ADD ]--------------------------------------
#
, t.topic_password
#
#-----[ FIND ]--------------------------------------------
#
$topic_time = $forum_topic_data['topic_time'];
#
#-----[ AFTER, ADD ]--------------------------------------
#
//
// Password check
//
if( !$is_auth['auth_mod'] && $userdata['user_level'] != ADMIN )
{
$redirect = str_replace("&", "&", preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($HTTP_SERVER_VARS['REQUEST_URI'])));
if( $HTTP_POST_VARS['cancel'] )
{
redirect(append_sid("index.$phpEx"));
}
else if( $HTTP_POST_VARS['pass_login'] )
{
if( $forum_topic_data['topic_password'] != '' )
{
password_check('topic', $topic_id, $HTTP_POST_VARS['password'], $redirect);
}
else if( $forum_topic_data['forum_password'] != '' )
{
password_check('forum', $forum_id, $HTTP_POST_VARS['password'], $redirect);
}
}
if( $forum_topic_data['topic_password'] != '' )
{
$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_tpass'])) : '';
if( $passdata[$topic_id] != md5($forum_topic_data['topic_password']) )
{
password_box('topic', $redirect);
}
}
else if( $forum_topic_data['forum_password'] != '' )
{
$passdata = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_fpass'])) : '';
if( $passdata[$forum_id] != md5($forum_topic_data['forum_password']) )
{
password_box('forum', $redirect);
}
}
}
//
// END: Password check
//
#
#-----[ OPEN ]--------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]--------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Password-protected topics/forums
//
function password_check ($mode, $id, $password, $redirect)
{
global $db, $template, $theme, $board_config, $lang, $phpEx, $phpbb_root_path, $gen_simple_header;
global $userdata;
global $HTTP_COOKIE_VARS;
$cookie_name = $board_config['cookie_name'];
$cookie_path = $board_config['cookie_path'];
$cookie_domain = $board_config['cookie_domain'];
$cookie_secure = $board_config['cookie_secure'];
switch($mode)
{
case 'topic':
$sql = "SELECT topic_password AS password FROM " . TOPICS_TABLE . " WHERE topic_id = $id";
$passdata = ( isset($HTTP_COOKIE_VARS[$cookie_name . '_tpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name . '_tpass'])) : '';
$savename = $cookie_name . '_tpass';
break;
case 'forum':
$sql = "SELECT forum_password AS password FROM " . FORUMS_TABLE . " WHERE forum_id = $id";
$passdata = ( isset($HTTP_COOKIE_VARS[$cookie_name . '_fpass']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name . '_fpass'])) : '';
$savename = $cookie_name . '_fpass';
break;
default:
$sql = '';
$passdata = '';
}
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not retrieve password', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
if( $password != $row['password'] )
{
$message = ( $mode == 'topic' ) ? $lang['Incorrect_topic_password'] : $lang['Incorrect_forum_password'];
message_die(GENERAL_MESSAGE, $message);
}
$passdata[$id] = md5($password);
setcookie($savename, serialize($passdata), 0, $cookie_path, $cookie_domain, $cookie_secure);
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3; url="' . $redirect . '" />'
)
);
$message = $lang['Password_login_success'] . '<br /><br />' . sprintf($lang['Click_return_page'], '<a href="' . $redirect . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
function password_box ($mode, $s_form_action)
{
global $db, $template, $theme, $board_config, $lang, $phpEx, $phpbb_root_path, $gen_simple_header;
global $userdata;
$l_enter_password = ( $mode == 'topic' ) ? $lang['Enter_topic_password'] : $lang['Enter_forum_password'];
$page_title = $l_enter_password;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'password_body.tpl'
)
);
$template->assign_vars(array(
'L_ENTER_PASSWORD' => $l_enter_password,
'L_SUBMIT' => $lang['Submit'],
'L_CANCEL' => $lang['Cancel'],
'S_FORM_ACTION' => $s_form_action
)
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
#
#-----[ OPEN ]--------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]--------------------------------------------
#
function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length)
#
#-----[ INLINE, FIND ]------------------------------------
#
, &$poll_length
#
#-----[ AFTER, ADD ]--------------------------------------
#
, &$topic_password
#
#-----[ FIND ]--------------------------------------------
#
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
}
#
#-----[ AFTER, ADD ]--------------------------------------
#
// Check topic password
if( !empty($topic_password) && !preg_match("#^[A-Za-z0-9]{3,20}$#si", $topic_password) )
{
$error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Only_alpha_num_chars'] : $lang['Only_alpha_num_chars'];
}
#
#-----[ FIND ]--------------------------------------------
#
function submit_post($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)
#
#-----[ INLINE, FIND ]------------------------------------
#
, &$poll_length
#
#-----[ AFTER, ADD ]--------------------------------------
#
, &$topic_password
#
#-----[ FIND ]--------------------------------------------
#
# 2.0.4
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";
#
#-----[ FIND ]--------------------------------------------
#
# >= 2.0.5
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
#
#-----[ INLINE, FIND ]------------------------------------
#
, topic_vote
#
#-----[ AFTER, ADD ]--------------------------------------
#
, topic_password
#
#-----[ INLINE, FIND ]------------------------------------
#
, $topic_vote
#
#-----[ AFTER, ADD ]--------------------------------------
#
, '$topic_password'
#
#-----[ INLINE, FIND ]------------------------------------
#
# 2.0.4
#
, topic_vote = $topic_vote
#
#-----[ INLINE, FIND ]------------------------------------
#
# >= 2.0.5
#
" . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . "
#
#-----[ AFTER, ADD ]--------------------------------------
#
, topic_password = '$topic_password'
#
#-----[ OPEN ]--------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]--------------------------------------------
#
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
#
#-----[ AFTER, ADD ]--------------------------------------
#
setcookie($cookiename . '_fpass', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_tpass', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
#
#-----[ FIND ]--------------------------------------------
#
setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
#
#-----[ AFTER, ADD ]--------------------------------------
#
setcookie($cookiename . '_fpass', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_tpass', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
#
#-----[ OPEN ]--------------------------------------------
#
# Make sure to edit this file for every language installed
#
language/lang_english/lang_main.php
#
#-----[ FIND ]--------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Password-protected topics
//
$lang['Topic_password'] = 'Topic password';
$lang['Enter_topic_password'] = 'Enter topic password';
$lang['Incorrect_topic_password'] = 'Incorrect topic password';
$lang['Password_login_success'] = 'Password login was successfull';
$lang['Click_return_page'] = 'Click %sHere%s to return to the page';
$lang['Not_auth_edit_post'] = 'You are not authorised to edit this post';
$lang['Not_delete_password_topics'] = 'You are not authorised to delete password-protected topics';
$lang['Only_alpha_num_chars'] = 'The password must be between 3-20 characters and can only contain alphanumeric characters (A-Z, a-z, 0-9).';
#
#-----[ OPEN ]--------------------------------------------
#
# Make sure to edit this file for every template installed
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]--------------------------------------------
#
<!-- BEGIN switch_html_checkbox -->
#
#-----[ BEFORE, ADD ]-------------------------------------
#
<!-- BEGIN switch_password_box -->
<tr>
<td colspan="2"><span class="gen">{L_TOPIC_PASSWORD}: <input type="text" name="topicpassword" value="{TOPIC_PASSWORD}" size="30" maxlength="20" class="post" /></span></td>
</tr>
<!-- END switch_password_box -->
#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#