diff --git a/phpBB/adm/admin_attachments.php b/phpBB/adm/admin_attachments.php index 05587a897e..61581f27ae 100644 --- a/phpBB/adm/admin_attachments.php +++ b/phpBB/adm/admin_attachments.php @@ -904,27 +904,27 @@ if ($mode == 'ext_groups') lang[strtoupper($action) . '_EXTENSION_GROUP']; ?> - lang['GROUP_NAME']; ?>: + lang['GROUP_NAME']; ?>: - lang['SPECIAL_CATEGORY']; ?>: + lang['SPECIAL_CATEGORY']; ?>:
lang['SPECIAL_CATEGORY_EXPLAIN']; ?> - lang['ALLOWED']; ?>: + lang['ALLOWED']; ?>: /> - lang['ALLOW_IN_PM']; ?>: + lang['ALLOW_IN_PM']; ?>: /> - lang['DOWNLOAD_MODE']; ?>: + lang['DOWNLOAD_MODE']; ?>:
lang['DOWNLOAD_MODE_EXPLAIN']; ?> - lang['UPLOAD_ICON']; ?>: + lang['UPLOAD_ICON']; ?>: @@ -935,11 +935,11 @@ if ($mode == 'ext_groups') - + - - + - + - + @@ -106,8 +106,8 @@ switch ($mode) $cache->destroy('word_censors'); - $log_action = ($word_id) ? 'log_edit_word' : 'log_add_word'; - add_log('admin', $log_action, stripslashes($word)); + $log_action = ($word_id) ? 'LOG_EDIT_WORD' : 'LOG_ADD_WORD'; + add_log('admin', $log_action, $word); $message = ($word_id) ? $user->lang['WORD_UPDATED'] : $user->lang['WORD_ADDED']; trigger_error($message); @@ -122,13 +122,20 @@ switch ($mode) trigger_error($user->lang['NO_WORD']); } + $sql = 'SELECT word + FROM ' . WORDS_TABLE . " + WHERE word_id = $word_id"; + $result = $db->sql_query($sql); + $deleted_word = $db->sql_fetchfield('word', 0, $result); + $db->sql_freeresult($result); + $sql = 'DELETE FROM ' . WORDS_TABLE . " WHERE word_id = $word_id"; $db->sql_query($sql); $cache->destroy('word_censors'); - add_log('admin', 'log_delete_word'); + add_log('admin', 'LOG_DELETE_WORD', $deleted_word); $message = $user->lang['WORD_REMOVE']; trigger_error($message); @@ -158,6 +165,7 @@ switch ($mode) ORDER BY word'; $result = $db->sql_query($sql); + $row_class = ''; if ($row = $db->sql_fetchrow($result)) { do diff --git a/phpBB/adm/pagestart.php b/phpBB/adm/pagestart.php index 4621fa67a2..d69f5c9b86 100644 --- a/phpBB/adm/pagestart.php +++ b/phpBB/adm/pagestart.php @@ -19,7 +19,7 @@ * ***************************************************************************/ -if (!defined('IN_PHPBB')) +if (!defined('IN_PHPBB') || !isset($phpbb_root_path)) { die('Hacking attempt'); } @@ -36,7 +36,7 @@ $user->setup('admin'); // Did user forget to login? Give 'em a chance to here ... if ($user->data['user_id'] == ANONYMOUS) { - login_box("adm/index.$phpEx$SID", '', $user->lang['LOGIN_ADMIN']); + login_box("{$phpbb_root_path}adm/index.$phpEx$SID", '', $user->lang['LOGIN_ADMIN']); } $auth->acl($user->data); diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 537199fb57..144dafbb30 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -40,15 +40,15 @@ class bbcode if ($bbcode_bitfield !== FALSE) { $this->bbcode_bitfield = $bbcode_bitfield; + // Init those added with a new bbcode_bitfield (already stored codes will not get parsed again) + $this->bbcode_cache_init(); } + if (!$this->bbcode_bitfield) { return $message; } - // Init those added with a new bbcode_bitfield (already stored codes will not get parsed again) - $this->bbcode_cache_init(); - $str = array('search' => array(), 'replace' => array()); $preg = array('search' => array(), 'replace' => array()); diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php index ccaca5e884..8b08b33458 100644 --- a/phpBB/includes/db/mysql.php +++ b/phpBB/includes/db/mysql.php @@ -131,7 +131,7 @@ class sql_db if ($cache_ttl && method_exists($cache, 'sql_save')) { $cache->sql_save($query, $this->query_result, $cache_ttl); - @mysql_free_result($this->query_result); + // mysql_free_result happened within sql_save() } elseif (preg_match('/^SELECT/', $query)) { diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 29b627bccc..9b399312c7 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -117,6 +117,29 @@ function get_userdata($user) return ($row = $db->sql_fetchrow($result)) ? $row : false; } +// Create forum rules for given forum +function generate_forum_rules($forum_data) +{ + if (!$forum_data['forum_rules'] && !$forum_data['forum_rules_link']) + { + return; + } + + global $template, $phpbb_root_path, $phpEx; + + if ($forum_data['forum_rules']) + { + include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + $text_flags = explode(':', $forum_data['forum_rules_flags']); + } + + $template->assign_vars(array( + 'S_FORUM_RULES' => true, + 'U_FORUM_RULES' => $forum_data['forum_rules_link'], + 'FORUM_RULES' => (!$forum_data['forum_rules_link']) ? parse_text_display($forum_data['forum_rules'], $forum_data['forum_rules_flags']) : '') + ); +} + // Create forum navigation links for given forum, create parent // list if currently null, assign basic forum info to template function generate_forum_nav(&$forum_data) @@ -235,7 +258,7 @@ function get_moderators(&$forum_moderators, $forum_id = false) } // User authorisation levels output -function gen_forum_rules($mode, &$forum_id) +function gen_forum_auth_level($mode, &$forum_id) { global $SID, $template, $auth, $user; @@ -1098,6 +1121,7 @@ function login_box($s_action, $s_hidden_fields = '', $login_explain = '', $ucp_l } $s_hidden_fields .= ($ucp_login && !empty($_SERVER['HTTP_REFERER'])) ? '' : ''; + $s_hidden_fields .= ''; $template->assign_vars(array( 'LOGIN_ERROR' => $err, @@ -1285,7 +1309,7 @@ function extension_allowed($forum_id, $extension) function msg_handler($errno, $msg_text, $errfile, $errline) { global $cache, $db, $auth, $template, $config, $user; - global $phpEx, $phpbb_root_path, $starttime, $display_header; + global $phpEx, $phpbb_root_path, $starttime, $display_header, $show_prev_info; switch ($errno) { @@ -1349,10 +1373,11 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; $msg_title = (!isset($msg_title)) ? $user->lang['INFORMATION'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); $display_header = (!isset($display_header)) ? false : (bool) $display_header; + $show_prev_info = (!isset($show_prev_info)) ? true : (bool) $show_prev_info; if (defined('IN_ADMIN')) { - adm_page_message($msg_title, $msg_text, $display_header); + adm_page_message($msg_title, $msg_text, $display_header, $show_prev_info); adm_page_footer(); } else diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 35f1dc2cc0..913962f566 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -779,12 +779,20 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE, } else { + if (!sizeof($where_ids)) + { + return; + } $where_sql = 'WHERE ' . $mode{0} . ".$where_type IN (" . implode(', ', $where_ids) . ')'; $where_sql_and = $where_sql . "\n\tAND"; } } else { + if (!sizeof($where_ids)) + { + return; + } $where_sql = 'WHERE ' . $mode{0} . ".$where_type IN (" . implode(', ', $where_ids) . ')'; $where_sql_and = $where_sql . "\n\tAND"; } @@ -807,7 +815,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE, FROM ' .TOPICS_TABLE . ' t1, ' . TOPICS_TABLE . " t2 WHERE t1.topic_moved_id = t2.topic_id AND t1.forum_id = t2.forum_id"; - $result = $db->sql_query($result); + $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) { diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 3bd9aba370..1932e2d2df 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -13,7 +13,7 @@ function display_forums($root_data = '', $display_moderators = TRUE) { - global $config, $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators; + global $config, $db, $template, $auth, $user, $phpEx, $SID, $forum_moderators, $phpbb_root_path; // Get posted/get info $mark_read = request_var('mark', ''); @@ -300,11 +300,10 @@ function display_forums($root_data = '', $display_moderators = TRUE) 'S_IS_CAT' => false, 'S_IS_LINK' => ($row['forum_type'] != FORUM_LINK) ? false : true, - 'FORUM_IMG' => $row['forum_image'], 'LAST_POST_IMG' => $user->img('icon_post_latest', 'VIEW_LATEST_POST'), 'FORUM_ID' => $row['forum_id'], - 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt), + 'FORUM_FOLDER_IMG' => ($row['forum_image']) ? '' . $folder_alt . '' : $user->img($folder_image, $folder_alt), 'FORUM_NAME' => $row['forum_name'], 'FORUM_DESC' => $row['forum_desc'], $l_post_click_count => $post_click_count, diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 4b2f2f2c71..00d521d412 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -101,7 +101,10 @@ function format_display(&$message, &$signature, $uid, $siguid, $enable_html, $en } // Second parse bbcode here - $bbcode->bbcode_second_pass($message, $uid); + if ($enable_bbcode) + { + $bbcode->bbcode_second_pass($message, $uid); + } // If we allow users to disable display of emoticons we'll need an appropriate // check and preg_replace here @@ -128,6 +131,101 @@ function format_display(&$message, &$signature, $uid, $siguid, $enable_html, $en return $message; } +// Three simple functions we use for bbcode/smilie/url capable text + +// prepare text to be inserted into db... +function parse_text_insert($text, $allow_bbcode, $allow_smilies, $allow_magic_url, &$text_flags) +{ + global $message_parser; + + $text_flags += ($allow_bbcode) ? 1 : 0; + $text_flags += ($allow_smilies) ? 2 : 0; + $text_flags += ($allow_magic_url) ? 4 : 0; + + $match = array('#\r\n?#', '#sid=[a-z0-9]*?&?#', "#([\n][\s]+){3,}#", '#&(\#[0-9]+;)#'); + $replace = array("\n", '', "\n\n", '&\1'); + $text = preg_replace($match, $replace, $text); + + // Parse BBCode + if (!method_exists('parse_message', 'parse_message') || !isset($message_parser)) + { + global $phpbb_root_path, $phpEx; + include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx); + $message_parser = new parse_message(); + } + + $message_parser->message = $text; + + if ($allow_bbcode && strpos($text, '[') !== false) + { + $message_parser->bbcode_init(); + $message_parser->bbcode(); + } + + // Parse Emoticons + $message_parser->emoticons($allow_smilies); + + // Parse URL's + $message_parser->magic_url($allow_magic_url); + + $text_flags = $text_flags . ':' . $message_parser->bbcode_uid . ':' . $message_parser->bbcode_bitfield; + + return $message_parser->message; +} + +// prepare text to be displayed/previewed... +function parse_text_display($text, $text_rules) +{ + global $bbcode, $user; + + $text_flags = explode(':', $text_rules); + + $allow_bbcode = (int) $text_flags[0] & 1; + $allow_smilies = (int) $text_flags[0] & 2; + $allow_magic_url = (int) $text_flags[0] & 4; + + $bbcode_uid = trim($text_flags[1]); + $bbcode_bitfield = (int) $text_flags[2]; + + if (!$bbcode && $allow_bbcode) + { + global $phpbb_root_path, $phpEx; + + include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); + $bbcode = new bbcode(); + } + + // Second parse bbcode here + if ($allow_bbcode) + { + $bbcode->bbcode_second_pass($text, $bbcode_uid, $bbcode_bitfield); + } + + // If we allow users to disable display of emoticons we'll need an appropriate + // check and preg_replace here + if ($allow_smilies) + { + $text = smilie_text($text, !$allow_smilies); + } + + // Replace naughty words such as farty pants + $text = str_replace("\n", '
', censor_text($text)); + + return $text; +} + +// prepare text to be displayed within a form (fetched from db) +function parse_text_form_display($text, $text_rules) +{ + // We use decode_text here... + $text_rules = explode(':', $text_rules); + $bbcode_uid = trim($text_rules[1]); + + decode_text($text, $bbcode_uid); + + return $text; +} + // Update Last Post Informations function update_last_post_information($type, $id) { diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index fc4d88149c..65006eb46f 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -190,6 +190,9 @@ CREATE TABLE phpbb_forums ( forum_password varchar(32) DEFAULT '' NOT NULL, forum_style tinyint(4) UNSIGNED, forum_image varchar(50) DEFAULT '' NOT NULL, + forum_rules text DEFAULT '' NOT NULL, + forum_rules_link varchar(200) DEFAULT '' NOT NULL, + forum_rules_flags varchar(50) DEFAULT '' NOT NULL, forum_topics_per_page tinyint(4) UNSIGNED DEFAULT '0' NOT NULL, forum_type tinyint(4) DEFAULT '0' NOT NULL, forum_status tinyint(4) DEFAULT '0' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 9a951e061f..4032fcec73 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -150,7 +150,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', ' INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_download_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_karma_pm', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_report_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_quote_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1'); diff --git a/phpBB/language/en/admin.php b/phpBB/language/en/admin.php index 93f2c3c2fa..2cde583ae4 100644 --- a/phpBB/language/en/admin.php +++ b/phpBB/language/en/admin.php @@ -123,11 +123,10 @@ $lang += array( 'LOG_USER_ACTIVE' => 'User activated
» %s', 'LOG_MASS_EMAIL' => 'Sent mass email
» %s', - 'LOG_MAIL_SESSION' => 'Logged Mail Session
» %s', - 'log_delete_word' => 'Deleted word censor', - 'log_edit_word' => 'Edited word censor
» %s', - 'log_add_word' => 'Added word censor
» %s', + 'LOG_DELETE_WORD' => 'Deleted word censor
» %s', + 'LOG_EDIT_WORD' => 'Edited word censor
» %s', + 'LOG_ADD_WORD' => 'Added word censor
» %s', 'log_db_backup' => 'Database backup', 'log_db_restore' => 'Database restore', @@ -136,7 +135,9 @@ $lang += array( 'log_disallow_add' => 'Added disallowed username
» %s', 'log_disallow_delete' => 'Deleted disallowed username', - 'log_admin_clear' => 'Cleared admin log', + 'LOG_ADMIN_CLEAR' => 'Cleared admin log', + 'LOG_MOD_CLEAR' => 'Cleared moderator log', + 'LOG_CRITICAL_CLEAR' => 'Cleared error log', 'LOG_PRUNE' => 'Pruned forums
» %s', 'LOG_AUTO_PRUNE' => 'Auto-pruned forums
» %s', @@ -163,6 +164,7 @@ $lang += array( 'LOG_AVATAR_CONFIG' => 'Altered avatar settings', 'LOG_AUTH_CONFIG' => 'Altered authentication settings', 'LOG_LOAD_CONFIG' => 'Altered load settings', + 'LOG_MESSAGE_CONFIG' => 'Altered private message settings', 'LOG_ATTACH_CONFIG' => 'Altered attachment settings', 'LOG_ATTACH_EXT_ADD' => 'Added or edited attachment extension
» %s', @@ -880,7 +882,7 @@ $lang += array( 'FORUM_ADMIN_EXPLAIN' => 'In phpBB 2.2 there are no categories, everything is forum based. Each forum can have an unlimited number of sub-forums and you can determine whether each may be posted to or not (i.e. whether it acts like an old category). Here you can add, edit, delete, lock, unlock individual forums as well as set certain additional controls. If your posts and topics have got out of sync you can also resynchronise a forum.', 'FORUM_EDIT_EXPLAIN' => 'The form below will allow you to customise this forum. Please note that moderation and post count controls are set via forum permissions for each user or usergroup.', 'FORUM_DELETE' => 'Delete Forum', - 'FORUM_DELETE_EXPLAIN' => 'The form below will allow you to delete a forum and decide where you want to put all topics (or forums) it contained.', + 'FORUM_DELETE_EXPLAIN' => 'The form below will allow you to delete a forum and decide where you want to put all topics (or forums) it contained.', 'EDIT_FORUM' => 'Edit forum', 'CREATE_FORUM' => 'Create new forum', @@ -909,7 +911,18 @@ $lang += array( 'FORUM_IMAGE' => 'Forum Image', 'FORUM_IMAGE_EXPLAIN'=> 'Location, relative to the phpBB root directory, of an image to associate with this forum.', 'FORUM_PARENT' => 'Parent Forum', + + 'FORUM_RULES' => 'Forum Rules', + 'FORUM_RULES_EXPLAIN' => 'Forum Rules are displayed at any page within the given forum.', + 'FORUM_RULES_LINK' => 'Link to Forum Rules', + 'FORUM_RULES_LINK_EXPLAIN'=> 'You are able to enter the URL of the page/post containing your forum rules here. This setting will override the Forum Rules text you specified.', + 'FORUM_RULES_PREVIEW' => 'Forum Rules preview', + 'PARSE_BBCODE' => 'Parse BBCode', + 'PARSE_SMILIES' => 'Parse Smilies', + 'PARSE_URLS' => 'Parse Links', + 'NO_PARENT' => 'No Parent', + 'LINK' => 'Link', 'LOCKED' => 'Locked', 'UNLOCKED' => 'Unlocked', 'ENABLE_NEWS' => 'Set as news forum', @@ -951,13 +964,15 @@ $lang += array( 'DELETE_ALL_POSTS' => 'Delete posts', 'DELETE_SUBFORUMS' => 'Delete subforums and posts', - 'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to', + 'NO_DESTINATION_FORUM' => 'You have not specified a forum to move content to', 'FORUM_PASSWORD_MISMATCH' => 'The passwords you entered did not match.', 'FORUM_NAME_EMPTY' => 'You must enter a name for this forum.', 'FORUM_DATA_NEGATIVE' => 'Pruning parameters cannot be negative.', + 'FORUM_CREATED' => 'Forum created successfully.', 'FORUM_UPDATED' => 'Forum informations updated successfully.', 'REDIRECT_ACL' => 'To set permissions for this forum click %sHERE%s.', 'FORUM_DELETED' => 'Forum successfully deleted', + 'FORUM_RESYNCED' => 'Forum successfully resynced', ); // Smiley and topic icons @@ -1768,7 +1783,9 @@ $lang += array( 'EXTENSION_GROUPS' => 'Extension Groups', 'EXTENSION_GROUP' => 'Extension Group', 'SPECIAL_CATEGORY' => 'Special Category', + 'SPECIAL_CATEGORY_EXPLAIN' => 'Special Categories differ between the way presented within posts.', 'DOWNLOAD_MODE' => 'Download Mode', + 'DOWNLOAD_MODE_EXPLAIN' => 'If you experience problems downloading files, set this to "physical", the user will be directed to the file directly. Do not set it to physical if not really needed, it discloses the filename.', 'UPLOAD_ICON' => 'Upload Icon', 'MAX_EXTGROUP_FILESIZE' => 'Maximum Filesize', 'ASSIGNED_EXTENSIONS' => 'Assigned Extensions', @@ -1781,10 +1798,11 @@ $lang += array( 'EXTENSION_GROUP_EXIST' => 'The Extension Group %s already exist', 'EXTENSION_GROUP_DELETED' => 'Extension Group successfully deleted', 'ALLOWED_FORUMS' => 'Allowed Forums', - 'ALLOWED_FORUMS_EXPLAIN' => 'Able to post the assigned extensions at the following forums', + 'ALLOWED_FORUMS_EXPLAIN' => 'Able to post the assigned extensions at the selected (or all if selected) forums', 'ALLOW_IN_PM' => 'Allowed in private messaging', 'ALLOW_ALL_FORUMS' => 'Allow All Forums', 'ALLOW_SELECTED_FORUMS' => 'Only Forums selected below', + 'GO_TO_EXTENSIONS' => 'Go to Extension Management Screen', 'CAT_IMAGES' => 'Images', 'CAT_WM_FILES' => 'Win Media Streams', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 3c6d26ff75..d325db31ed 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -46,6 +46,7 @@ $lang += array( 'ACP' => 'Administration Control Panel', 'ACTIVE_ERROR' => 'You have specified an inactive username. Please activate your account and try again. If you continue to have problems please contact a board administrator.', 'ALLOWED' => 'Allowed', + 'ALL_FORUMS' => 'All Forums', 'ALL_MESSAGES' => 'All Messages', 'ALL_POSTS' => 'All Posts', 'ALL_TIMES' => 'All times are %s %s', @@ -82,6 +83,7 @@ $lang += array( 'DAY' => 'Day', 'DAYS' => 'Days', 'DELETE' => 'Delete', + 'DELETE_MARKED' => 'Delete Marked', 'DESCENDING' => 'Descending', 'DISABLED' => 'Disabled', 'DISPLAY_MESSAGES' => 'Display messages from previous', @@ -111,6 +113,7 @@ $lang += array( 'FORUM_INDEX' => 'Board Index', 'FORUM_LOCATION' => 'Forum Location', 'FORUM_LOCKED' => 'Forum Locked', + 'FORUM_RULES' => 'Forum Rules', 'FROM' => 'from', 'GO' => 'Go', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index b305876e34..56a76a64a9 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -85,6 +85,7 @@ $lang += array( 'CURRENT_PASSWORD_EXPLAIN' => 'You must confirm your current password if you wish to change it, alter your email address or username.', 'CUR_PASSWORD_ERROR' => 'The current password you entered is incorrect.', + 'DEFAULT_ACTION' => 'Default Action', 'DEFAULT_ADD_SIG' => 'Attach my signature by default', 'DEFAULT_BBCODE' => 'Enable BBCode by default', 'DEFAULT_HTML' => 'Enable HTML by default', @@ -97,7 +98,6 @@ $lang += array( 'DELETE_ATTACHMENT_CONFIRM' => 'Are you sure you want to delete this attachment?', 'DELETE_ATTACHMENTS_CONFIRM'=> 'Are you sure you want to delete these attachments?', 'DELETE_AVATAR' => 'Delete Image', - 'DELETE_MARKED' => 'Delete Marked', 'DELETE_MARKED_PM' => 'Delete Marked Messages', 'DELETE_MARKED_PM_CONFIRM' => 'Are you sure you want to delete all marked messages?', 'DELETE_PM' => 'Delete PM', @@ -137,6 +137,7 @@ $lang += array( 'HIDE_ONLINE' => 'Hide my online status', + 'IF_FOLDER_FULL' => 'If Folder Full', 'IMPORTANT_NEWS' => 'Important announcements', 'LANGUAGE' => 'Language', @@ -144,6 +145,7 @@ $lang += array( 'LINK_REMOTE_AVATAR_EXPLAIN'=> 'Enter the URL of the location containing the Avatar image you wish to link to.', 'LINK_REMOTE_SIZE' => 'Avatar dimensions', 'LINK_REMOTE_SIZE_EXPLAIN' => 'Specify the width and height of the avatar, leave blank to attempt automatic verification.', + 'LOGIN_EXPLAIN_UCP' => 'Please Login in order to access the User Control Panel', 'LOGIN_REDIRECT' => 'You have been successfully logged in.', 'LOGOUT_REDIRECT' => 'You have been successfully logged out.', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 25840654c1..0cf6d7a867 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -46,7 +46,7 @@ switch ($mode) trigger_error($user->lang['NO_VIEW_USERS']); } - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI']))); + login_box($user->cur_page, '', $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]); } break; } diff --git a/phpBB/posting.php b/phpBB/posting.php index 68d80d2b35..725295f5bf 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -266,7 +266,7 @@ if (!$auth->acl_get('f_' . $mode, $forum_id) && $forum_type == FORUM_POST) trigger_error('USER_CANNOT_' . strtoupper($mode)); } - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])), '', $user->lang['USER_CANNOT_' . strtoupper($mode)]); + login_box($user->cur_page, '', $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)]); } @@ -917,10 +917,18 @@ $forum_data = array( 'forum_name' => $forum_name, 'forum_id' => $forum_id, 'forum_type' => $forum_type, - 'forum_desc' => $forum_desc + 'forum_desc' => $forum_desc, + 'forum_rules' => $forum_rules, + 'forum_rules_flags' => $forum_rules_flags, + 'forum_rules_link' => $forum_rules_link ); + +// Generate Navigation Links generate_forum_nav($forum_data); +// Generate Forum Rules +generate_forum_rules($forum_data); + $s_hidden_fields = ($mode == 'reply' || $mode == 'quote') ? '' : ''; $s_hidden_fields .= ''; $s_hidden_fields .= (isset($check_value)) ? '' : ''; diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 05d6898e75..fccc9922b0 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -48,15 +48,16 @@ function checkForm() -

+

{L_FORUM_RULES} - {L_FORUM_RULES} + {L_FORUM_RULES}
+ {FORUM_RULES} -

+
-
+
diff --git a/phpBB/styles/subSilver/template/posting_review.html b/phpBB/styles/subSilver/template/posting_review.html index ba2bd64922..d4296ecdeb 100644 --- a/phpBB/styles/subSilver/template/posting_review.html +++ b/phpBB/styles/subSilver/template/posting_review.html @@ -29,9 +29,6 @@ - - -
lang['MAX_EXTGROUP_FILESIZE']; ?>:lang['MAX_EXTGROUP_FILESIZE']; ?>:
+ +
lang['ASSIGNED_EXTENSIONS']; ?>:
lang['ASSIGNED_EXTENSIONS']; ?>:
»  
 
+ ?>
 
[ lang['GO_TO_EXTENSIONS']; ?> ]
lang['ALLOWED_FORUMS']; ?>:
lang['ALLOWED_FORUMS_EXPLAIN']; ?>
lang['ALLOWED_FORUMS']; ?>:
lang['ALLOWED_FORUMS_EXPLAIN']; ?>
/> lang['ALLOW_ALL_FORUMS']; ?>   /> lang['ALLOW_SELECTED_FORUMS']; ?>

- + $vars) { - case 'cookie': + if (!is_array($vars)) + { + continue; + } - $cookie_secure_yes = ($new['cookie_secure']) ? 'checked="checked"' : ''; - $cookie_secure_no = (!$new['cookie_secure']) ? 'checked="checked"' : ''; + $type = explode(':', $vars['type']); ?> + - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS'); - foreach ($types as $type => $lang) - { - $selected = ($new['bump_type'] == $type) ? 'selected="selected" ' : ''; - $s_bump_type .= ''; - } - - $user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[\w]+', 'USERNAME_ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+'); - $user_char_options = ''; - foreach ($user_char_ary as $lang => $value) - { - $selected = ($new['allow_name_chars'] == $value) ? ' selected="selected"' : ''; - $user_char_options .= ''; - } - - $pass_type_ary = array('PASS_TYPE_ANY' => '.*', 'PASS_TYPE_CASE' => '[a-zA-Z]', 'PASS_TYPE_ALPHA' => '[a-zA-Z0-9]', 'PASS_TYPE_SYMBOL' => '[a-zA-Z\W]'); - $pass_char_options = ''; - foreach ($pass_type_ary as $lang => $value) - { - $selected = ($new['pass_complex'] == $value) ? ' selected="selected"' : ''; - $pass_char_options .= ''; - } - -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -' . $user->lang['SMTP_' . str_replace('-', '_', $method)] . ''; - } -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -' . ucfirst($method) . ''; - } - -?> - - - - - - - - - - - - - - - - - - - - - - - - - @@ -886,4 +350,219 @@ switch ($mode) adm_page_footer(); +function select_auth_method($selected_method) +{ + global $new, $phpbb_root_path, $phpEx; + + $auth_plugins = array(); + + $dp = opendir($phpbb_root_path . 'includes/auth'); + while ($file = readdir($dp)) + { + if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file)) + { + $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file); + } + } + + sort($auth_plugins); + + $auth_select = ''; + foreach ($auth_plugins as $method) + { + $selected = ($selected_method == $method) ? ' selected="selected"' : ''; + $auth_select .= ''; + } + + return $auth_select; +} + +function mail_auth_select($selected_method) +{ + global $user; + + $auth_methods = array('PLAIN', 'LOGIN', 'CRAM-MD5', 'DIGEST-MD5', 'POP-BEFORE-SMTP'); + $s_smtp_auth_options = ''; + + foreach ($auth_methods as $method) + { + $s_smtp_auth_options .= ''; + } + + return $s_smtp_auth_options; +} + +function full_folder_select($value) +{ + global $user; + + return ''; +} + +function select_ip_check($value) +{ + global $user; + + $ip_all = ($value == 4) ? ' checked="checked"' : ''; + $ip_classc = ($value == 3) ? ' checked="checked"' : ''; + $ip_classb = ($value == 2) ? ' checked="checked"' : ''; + $ip_none = ($value == 0) ? ' checked="checked"' : ''; + + $options = << {$user->lang['ALL']}   {$user->lang['CLASS_C']}   {$user->lang['CLASS_B']}   {$user->lang['NONE']}   +EOT; + + return $options; +} + +function select_acc_activation($value) +{ + global $user, $config; + + $activation_none = ($value == USER_ACTIVATION_NONE) ? ' checked="checked"' : ''; + $activation_user = ($value == USER_ACTIVATION_SELF) ? ' checked="checked"' : ''; + $activation_admin = ($value == USER_ACTIVATION_ADMIN) ? ' checked="checked"' : ''; + $activation_disable = ($value == USER_ACTIVATION_DISABLE) ? ' checked="checked"' : ''; + + $options = ' ' . $user->lang['ACC_NONE']; + + if ($config['email_enable']) + { + $options .= '   ' . $user->lang['ACC_USER']; + $options .= '   ' . $user->lang['ACC_ADMIN']; + } + $options .= '   ' . $user->lang['ACC_DISABLE']; + + return $options; +} + +function username_length($value) +{ + global $new, $user; + + return ' ' . $user->lang['MIN_CHARS'] . '   ' . $user->lang['MAX_CHARS']; +} + +function select_username_chars($selected_value) +{ + global $user; + + $user_char_ary = array('USERNAME_CHARS_ANY' => '.*', 'USERNAME_ALPHA_ONLY' => '[\w]+', 'USERNAME_ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+'); + $user_char_options = ''; + foreach ($user_char_ary as $lang => $value) + { + $selected = ($selected_value == $value) ? ' selected="selected"' : ''; + $user_char_options .= ''; + } + + return $user_char_options; +} + +function password_length($value) +{ + global $new, $user; + + return ' ' . $user->lang['MIN_CHARS'] . '   ' . $user->lang['MAX_CHARS']; +} + +function select_password_chars($selected_value) +{ + global $user; + + $pass_type_ary = array('PASS_TYPE_ANY' => '.*', 'PASS_TYPE_CASE' => '[a-zA-Z]', 'PASS_TYPE_ALPHA' => '[a-zA-Z0-9]', 'PASS_TYPE_SYMBOL' => '[a-zA-Z\W]'); + $pass_char_options = ''; + foreach ($pass_type_ary as $lang => $value) + { + $selected = ($selected_value == $value) ? ' selected="selected"' : ''; + $pass_char_options .= ''; + } + + return $pass_char_options; +} + +function bump_interval($value) +{ + global $new, $user; + + $s_bump_type = ''; + $types = array('m' => 'MINUTES', 'h' => 'HOURS', 'd' => 'DAYS'); + foreach ($types as $type => $lang) + { + $selected = ($new['bump_type'] == $type) ? 'selected="selected" ' : ''; + $s_bump_type .= ''; + } + + return ' '; +} + +function board_disable($value) +{ + global $new, $user; + + $board_disable_yes = ($value) ? ' checked="checked"' : ''; + $board_disable_no = (!$value) ? ' checked="checked"' : ''; + + return ' ' . $user->lang['YES'] . '   ' . $user->lang['NO'] . '
'; +} + +function build_cfg_template($tpl_type, $config_key, $options = '') +{ + global $new, $user; + + $tpl = ''; + $name = 'config[' . $config_key . ']'; + + switch ($tpl_type[0]) + { + case 'text': + case 'password': + $size = (int) $tpl_type[1]; + $maxlength = (int) $tpl_type[2]; + + $tpl = ''; + break; + + case 'dimension': + $size = (int) $tpl_type[1]; + $maxlength = (int) $tpl_type[2]; + + $tpl = ' x '; + break; + + case 'textarea': + $rows = (int) $tpl_type[1]; + $cols = (int) $tpl_type[2]; + + $tpl = ''; + break; + + case 'radio': + $key_yes = ($new[$config_key]) ? 'checked="checked"' : ''; + $key_no = (!$new[$config_key]) ? 'checked="checked"' : ''; + + $tpl_type_cond = explode('_', $tpl_type[1]); + $type_no = ($tpl_type_cond[0] == 'disabled' || $tpl_type_cond[0] == 'enabled') ? false : true; + + $tpl_no = '' . (($type_no) ? $user->lang['NO'] : $user->lang['DISABLED']); + $tpl_yes = '' . (($type_no) ? $user->lang['YES'] : $user->lang['ENABLED']); + + $tpl = ($tpl_type_cond[0] == 'yes' || $tpl_type_cond[0] == 'enabled') ? $tpl_yes . '  ' . $tpl_no : $tpl_no . '  ' . $tpl_yes; + break; + + case 'select': + eval('$s_options = ' . str_replace('{VALUE}', $new[$config_key], $options) . ';'); + $tpl = ''; + break; + + case 'custom': + eval('$tpl = ' . str_replace('{VALUE}', $new[$config_key], $options) . ';'); + break; + + default: + break; + } + + return $tpl; +} + ?> \ No newline at end of file diff --git a/phpBB/adm/admin_forums.php b/phpBB/adm/admin_forums.php index 4da3de90f4..712c87ca45 100644 --- a/phpBB/adm/admin_forums.php +++ b/phpBB/adm/admin_forums.php @@ -78,6 +78,7 @@ if ($update) // $auth->acl_clear_prefetch(); + $show_prev_info = false; trigger_error($user->lang['FORUM_DELETED']); break; @@ -97,6 +98,11 @@ if ($update) 'forum_link' => request_var('forum_link', ''), 'forum_link_track' => request_var('forum_link_track', FALSE), 'forum_desc' => str_replace("\n", '
', request_var('forum_desc', '')), + 'forum_rules' => request_var('forum_rules', ''), + 'forum_rules_link' => request_var('forum_rules_link', ''), + 'rules_allow_bbcode' => request_var('parse_bbcode', false), + 'rules_allow_smilies' => request_var('parse_smilies', false), + 'rules_allow_urls' => request_var('parse_urls', false), 'forum_image' => request_var('forum_image', ''), 'forum_style' => request_var('forum_style', 0), 'display_on_index' => request_var('display_on_index', FALSE), @@ -127,6 +133,7 @@ if ($update) // Redirect to permissions $message = ($mode == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED']; $message .= '

' . sprintf($user->lang['REDIRECT_ACL'], "', ''); + $show_prev_info = ($mode == 'edit') ? true : false; trigger_error($message); break; @@ -150,10 +157,17 @@ switch ($mode) $forum_status = request_var('forum_status', ITEM_UNLOCKED); $forum_desc = request_var('forum_desc', ''); $forum_name = request_var('forum_name', ''); + $forum_rules_link = request_var('forum_rules_link', ''); + $forum_rules = request_var('forum_rules', ''); $forum_password = request_var('forum_password', ''); $forum_password_confirm = request_var('forum_password_confirm', ''); - } + $forum_rules_flags = 0; + $forum_rules_flags += (request_var('parse_bbcode', false)) ? 1 : 0; + $forum_rules_flags += (request_var('parse_smilies', false)) ? 2 : 0; + $forum_rules_flags += (request_var('parse_urls', false)) ? 4 : 0; + } + // Show form to create/modify a forum if ($mode == 'edit') { @@ -174,6 +188,13 @@ switch ($mode) $forums_list = make_forum_select($parent_id, $forum_id, false, true, false); $forum_password_confirm = $forum_password; + + $flags = explode(':', $forum_rules_flags); + + $bbcode_checked = ((int) $flags[0] & 1) ? ' checked="checked"' : ''; + $smilies_checked = ((int) $flags[0] & 2) ? ' checked="checked"' : ''; + $urls_checked = ((int) $flags[0] & 4) ? ' checked="checked"' : ''; + unset($flags); } else { @@ -186,16 +207,36 @@ switch ($mode) { $temp_forum_desc = $forum_desc; $temp_forum_name = $forum_name; + $temp_forum_rules = $forum_rules; + $temp_forum_rules_link = $forum_rules_link; $temp_forum_type = $forum_type; extract(get_forum_info($parent_id)); $forum_type = $temp_forum_type; $forum_name = $temp_forum_name; $forum_desc = $temp_forum_desc; + $forum_rules = $temp_forum_rules; + $forum_rules_link = $temp_forum_rules_link; $forum_password_confirm = $forum_password; } } + // Forum Rules + if ($forum_rules) + { + include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + + // Split text rules (we saved the status and bbcode codes here) + if (!strstr($forum_rules_flags, ':') && is_numeric($forum_rules_flags)) + { + // text not parsed yet... a hard time for us... + $forum_rules_flags = 0; + $forum_rules = parse_text_insert($forum_rules, request_var('parse_bbcode', false), request_var('parse_smilies', false), request_var('parse_urls', false), $forum_rules_flags); + } + + $forum_rules_preview = parse_text_display($forum_rules, $forum_rules_flags); + } + $forum_type_options = ''; $forum_type_ary = array(FORUM_CAT => 'CAT', FORUM_POST => 'FORUM', FORUM_LINK => 'LINK'); foreach ($forum_type_ary as $value => $lang) @@ -231,7 +272,7 @@ switch ($mode) $forums_nav = get_forum_branch($forum_id, 'parents', 'descending'); foreach ($forums_nav as $row) { - $navigation .= ($row['forum_id'] == $forum_id) ? ' -> ' . $row['forum_name'] : ' -> ' . $row['forum_name'] . ''; + $navigation .= ($row['forum_id'] == $forum_id) ? ' -> ' . $row['forum_name'] : ' -> ' . $row['forum_name'] . ''; } adm_page_header($l_title); @@ -269,7 +310,7 @@ switch ($mode) ?>
- + - + @@ -334,19 +375,47 @@ switch ($mode) ?> - + + + + + + + + + + + + + + + + + - @@ -740,18 +809,18 @@ while ($row = $db->sql_fetchrow($result)) if ($row['forum_status'] == ITEM_LOCKED) { - $folder_image = '' . $user->lang['LOCKED'] . ''; + $folder_image = '' . $user->lang['LOCKED'] . ''; } else { switch ($forum_type) { case FORUM_LINK: - $folder_image = '' . $user->lang['LINK'] . ''; + $folder_image = '' . $user->lang['LINK'] . ''; break; default: - $folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '' . $user->lang['SUBFORUM'] . '' : '' . $user->lang['FOLDER'] . ''; + $folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '' . $user->lang['SUBFORUM'] . '' : '' . $user->lang['FOLDER'] . ''; } } @@ -812,9 +881,9 @@ while ($row = $db->sql_fetchrow($result))
lang[$l_title]; ?>lang[$display_vars['title']]; ?>
lang['COOKIE_DOMAIN']; ?>:
lang['COOKIE_NAME']; ?>:
lang['COOKIE_PATH']; ?>:
lang['COOKIE_SECURE']; ?>:
lang['COOKIE_SECURE_EXPLAIN']; ?>
/>lang['DISABLED']; ?>   />lang['ENABLED']; ?>lang[$vars['lang']]; ?>: ' . $user->lang[$vars['lang'] . '_EXPLAIN'] . '' : ''; ?>
lang['ALLOW_LOCAL']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_REMOTE']; ?>:
lang['ALLOW_REMOTE_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_UPLOAD']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['MAX_FILESIZE']; ?>:
lang['MAX_FILESIZE_EXPLAIN']; ?>
Bytes
lang['MIN_AVATAR_SIZE']; ?>:
lang['MIN_AVATAR_SIZE_EXPLAIN']; ?>
x
lang['MAX_AVATAR_SIZE']; ?>:
lang['MAX_AVATAR_SIZE_EXPLAIN']; ?>
x
lang['AVATAR_STORAGE_PATH']; ?>:
lang['AVATAR_STORAGE_PATH_EXPLAIN']; ?>
lang['AVATAR_GALLERY_PATH']; ?>:
lang['AVATAR_GALLERY_PATH_EXPLAIN']; ?>
lang['DEFAULT_STYLE']; ?>
lang['OVERRIDE_STYLE']; ?>:
lang['OVERRIDE_STYLE_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['DEFAULT_LANGUAGE']; ?>:
lang['DEFAULT_DATE_FORMAT']; ?>:
lang['DEFAULT_DATE_FORMAT_EXPLAIN']; ?>
lang['SYSTEM_TIMEZONE']; ?>:
lang['SYSTEM_DST']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['BOARD_PM']; ?>:
lang['BOARD_PM_EXPLAIN']; ?>
/>lang['ENABLED']; ?>   />lang['DISABLED']; ?>
lang['ALLOW_TOPIC_NOTIFY']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_FORUM_NOTIFY']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_NAME_CHANGE']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_ATTACHMENTS']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_PM_ATTACHMENTS']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_HTML']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOWED_TAGS']; ?>:
lang['ALLOWED_TAGS_EXPLAIN']; ?>
lang['ALLOW_BBCODE']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_SMILIES']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_SIG']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['MAX_SIG_LENGTH']; ?>:
lang['MAX_SIG_LENGTH_EXPLAIN']; ?>
lang['ALLOW_NO_CENSORS']; ?>:
lang['ALLOW_NO_CENSORS_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['SITE_NAME']; ?>:
lang['SITE_DESC']; ?>:
lang['DISABLE_BOARD']; ?>:
lang['DISABLE_BOARD_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['ACC_ACTIVATION']; ?>:
lang['ACC_ACTIVATION_EXPLAIN']; ?>
/> lang['ACC_NONE']; ?>   /> lang['ACC_USER']; ?>   /> lang['ACC_ADMIN']; ?>   /> lang['ACC_DISABLE']; ?>
lang['ENABLE_COPPA']; ?>:
lang['ENABLE_COPPA_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['COPPA_FAX']; ?>:
lang['COPPA_MAIL']; ?>:
lang['COPPA_MAIL_EXPLAIN']; ?>
lang['VISUAL_CONFIRM']; ?>:
lang['VISUAL_CONFIRM_EXPLAIN']; ?>
/> lang['YES'] ?>   /> lang['NO']; ?>
lang['REG_LIMIT']; ?>:
lang['REG_LIMIT_EXPLAIN']; ?>
lang['USERNAME_LENGTH']; ?>:
lang['USERNAME_LENGTH_EXPLAIN']; ?>
lang['MIN_CHARS']; ?>   lang['MAX_CHARS']; ?>
lang['USERNAME_CHARS']; ?>:
lang['USERNAME_CHARS_EXPLAIN']; ?>
lang['PASSWORD_LENGTH']; ?>:
lang['PASSWORD_LENGTH_EXPLAIN']; ?>
lang['MIN_CHARS']; ?>   lang['MAX_CHARS']; ?>
lang['PASSWORD_TYPE']; ?>:
lang['PASSWORD_TYPE_EXPLAIN']; ?>
lang['FORCE_PASS_CHANGE']; ?>:
lang['FORCE_PASS_CHANGE_EXPLAIN']; ?>
lang['DAYS']; ?>
lang['ALLOW_EMAIL_REUSE']; ?>:
lang['ALLOW_EMAIL_REUSE_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['EDIT_TIME']; ?>:
lang['EDIT_TIME_EXPLAIN']; ?>
lang['DISPLAY_LAST_EDITED']; ?>:
lang['DISPLAY_LAST_EDITED_EXPLAIN']; ?>
/>lang['YES']; ?>   />lang['NO']; ?>
lang['FLOOD_INTERVAL']; ?>:
lang['FLOOD_INTERVAL_EXPLAIN']; ?>
lang['BUMP_INTERVAL']; ?>:
lang['BUMP_INTERVAL_EXPLAIN']; ?>
 
lang['TOPICS_PER_PAGE']; ?>:
lang['POSTS_PER_PAGE']; ?>:
lang['HOT_THRESHOLD']; ?>:
lang['MAX_POLL_OPTIONS']; ?>:
lang['CHAR_LIMIT']; ?>:
lang['CHAR_LIMIT_EXPLAIN']; ?> -
lang['SMILIES_LIMIT']; ?>:
lang['SMILIES_LIMIT_EXPLAIN']; ?> -
lang['QUOTE_DEPTH_LIMIT']; ?>:
lang['QUOTE_DEPTH_LIMIT_EXPLAIN']; ?> -
lang['ENABLE_EMAIL']; ?>:
lang['ENABLE_EMAIL_EXPLAIN']; ?>
/> lang['ENABLED']; ?>   /> lang['DISABLED']; ?>
lang['BOARD_EMAIL_FORM']; ?>:
lang['BOARD_EMAIL_FORM_EXPLAIN']; ?>
/> lang['ENABLED']; ?>   /> lang['DISABLED']; ?>
lang['EMAIL_FUNCTION_NAME']; ?>:
lang['EMAIL_FUNCTION_NAME_EXPLAIN']; ?>
lang['EMAIL_PACKAGE_SIZE']; ?>:
lang['EMAIL_PACKAGE_SIZE_EXPLAIN']; ?>
lang['CONTACT_EMAIL']; ?>:
lang['CONTACT_EMAIL_EXPLAIN']; ?>
lang['ADMIN_EMAIL']; ?>:
lang['ADMIN_EMAIL_EXPLAIN']; ?>
lang['EMAIL_SIG']; ?>:
lang['EMAIL_SIG_EXPLAIN']; ?>
lang['USE_SMTP']; ?>:
lang['USE_SMTP_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['SMTP_SERVER']; ?>:
lang['SMTP_PORT']; ?>:
lang['SMTP_PORT_EXPLAIN']; ?>
lang['SMTP_AUTH_METHOD']; ?>:
lang['SMTP_AUTH_METHOD_EXPLAIN']; ?>
lang['SMTP_USERNAME']; ?>:
lang['SMTP_USERNAME_EXPLAIN']; ?>
lang['SMTP_PASSWORD']; ?>:
lang['SMTP_PASSWORD_EXPLAIN']; ?>
lang['SERVER_NAME']; ?>:
lang['SERVER_NAME_EXPLAIN']; ?>
lang['SERVER_PORT']; ?>:
lang['SERVER_PORT_EXPLAIN']; ?>
lang['SCRIPT_PATH']; ?>:
lang['SCRIPT_PATH_EXPLAIN']; ?>
lang['IP_VALID']; ?>:
lang['IP_VALID_EXPLAIN']; ?>
/> lang['ALL']; ?>   /> lang['CLASS_C']; ?>   /> lang['CLASS_B']; ?>   /> lang['NONE']; ?>  
lang['BROWSER_VALID']; ?>:
lang['BROWSER_VALID_EXPLAIN']; ?>
/> lang['YES']; ?>   /> lang['NO']; ?>
lang['ENABLE_GZIP']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['SMILIES_PATH']; ?>:
lang['SMILIES_PATH_EXPLAIN']; ?>
lang['ICONS_PATH']; ?>:
lang['ICONS_PATH_EXPLAIN']; ?>
lang['UPLOAD_ICONS_PATH']; ?>:
lang['UPLOAD_ICONS_PATH_EXPLAIN']; ?>
lang['RANKS_PATH']; ?>:
lang['RANKS_PATH_EXPLAIN']; ?>
lang['LIMIT_LOAD']; ?>:
lang['LIMIT_LOAD_EXPLAIN']; ?>
lang['SESSION_LENGTH']; ?>:
lang['SESSION_LENGTH_EXPLAIN']; ?>
lang['LIMIT_SESSIONS']; ?>:
lang['LIMIT_SESSIONS_EXPLAIN']; ?>
lang['YES_POST_MARKING']; ?>:
lang['YES_POST_MARKING_EXPLAIN']; ?>
/>lang['YES'] ?>   /> lang['NO']; ?>
lang['YES_READ_MARKING']; ?>:
lang['YES_READ_MARKING_EXPLAIN']; ?>
/>lang['YES'] ?>   /> lang['NO']; ?>
lang['YES_ONLINE']; ?>:
lang['YES_ONLINE_EXPLAIN']; ?>
/>lang['YES'] ?>   /> lang['NO']; ?>
lang['YES_ONLINE_TRACK']; ?>:
lang['YES_ONLINE_TRACK_EXPLAIN']; ?>
/>lang['YES'] ?>   /> lang['NO']; ?>
lang['ONLINE_LENGTH']; ?>:
lang['ONLINE_LENGTH_EXPLAIN']; ?>
lang['YES_BIRTHDAYS']; ?>: />lang['YES'] ?>   /> lang['NO']; ?>
lang['YES_MODERATORS']; ?>: />lang['YES'] ?>   /> lang['NO']; ?>
lang['YES_JUMPBOX']; ?>: />lang['YES'] ?>   /> lang['NO']; ?>
lang['YES_SEARCH']; ?>:
lang['YES_SEARCH_EXPLAIN']; ?>
/>lang['YES'] ?>   /> lang['NO']; ?>
lang['SEARCH_INTERVAL']; ?>:
lang['SEARCH_INTERVAL_EXPLAIN']; ?>
lang['MIN_SEARCH_CHARS']; ?>:
lang['MIN_SEARCH_CHARS_EXPLAIN']; ?> -
lang['MAX_SEARCH_CHARS']; ?>:
lang['MAX_SEARCH_CHARS_EXPLAIN']; ?> -
lang['YES_SEARCH_UPDATE']; ?>:
lang['YES_SEARCH_UPDATE_EXPLAIN']; ?>
/>lang['YES'] ?>   /> lang['NO']; ?>
lang['RECOMPILE_TEMPLATES']; ?>:
lang['RECOMPILE_TEMPLATES_EXPLAIN']; ?>
/>lang['YES'] ?>   /> lang['NO']; ?>
lang['BOXES_MAX']; ?>:
lang['BOXES_MAX_EXPLAIN']; ?>
lang['BOXES_LIMIT']; ?>:
lang['BOXES_LIMIT_EXPLAIN']; ?>
lang['FULL_FOLDER_ACTION']; ?>:
lang['FULL_FOLDER_ACTION_EXPLAIN']; ?>
lang['PM_EDIT_TIME']; ?>:
lang['PM_EDIT_TIME_EXPLAIN']; ?>
lang['ALLOW_MASS_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_HTML_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_BBCODE_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_SMILIES_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['AUTH_DOWNLOAD_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ALLOW_SIG_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['AUTH_REPORT_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['AUTH_QUOTE_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['PRINT_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['EMAIL_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['FORWARD_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['AUTH_IMG_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['AUTH_FLASH_PM']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['ENABLE_PM_ICONS']; ?>: /> lang['YES']; ?>   /> lang['NO']; ?>
lang['AUTH_METHOD']; ?>:
lang['ENABLE_KARMA']; ?>: />lang['YES'] ?>   /> lang['NO']; ?>
lang['MIN_RATINGS']; ?>:
lang['MIN_RATINGS_EXPLAIN']; ?> -
lang['KARMA_HIST_WEIGHT']; ?>:
lang['KARMA_HIST_WEIGHT_EXPLAIN']; ?> -
lang['KARMA_DAY_WEIGHT']; ?>:
lang['KARMA_DAY_WEIGHT_EXPLAIN']; ?> -
lang['KARMA_REG_WEIGHT']; ?>:
lang['KARMA_REG_WEIGHT_EXPLAIN']; ?> -
lang['KARMA_POST_WEIGHT']; ?>:
lang['KARMA_POST_WEIGHT_EXPLAIN']; ?> -
lang['FORUM_TYPE'] ?>: lang['FORUM_TYPE'] ?>:
lang['FORUM_LINK'] ?>:
lang['FORUM_LINK_EXPLAIN']; ?>
lang['FORUM_LINK_TRACK'] ?>:
lang['FORUM_LINK_TRACK_EXPLAIN']; ?>
lang['FORUM_NAME']; ?>:
lang['FORUM_DESC'] ?>:
lang['FORUM_DESC_EXPLAIN']; ?>
lang['FORUM_RULES_LINK']; ?>:
lang['FORUM_RULES_LINK_EXPLAIN']; ?>
lang['FORUM_RULES_PREVIEW'] ?>:
lang['FORUM_RULES'] ?>:
lang['FORUM_RULES_EXPLAIN']; ?>
+
/>lang['PARSE_BBCODE']; ?> />lang['PARSE_SMILIES']; ?> />lang['PARSE_URLS']; ?>
+
lang['FORUM_IMAGE']; ?>:
lang['FORUM_IMAGE_EXPLAIN']; ?>


'; + echo ''; } ?>
-
+
- +
lang['SELECT_FORUM']; ?>: lang['SELECT_FORUM']; ?>:
sql_query($sql); } + $cache->destroy('extensions'); $log_action = implode('_', array($log_action_posts, $log_action_forums)); @@ -1335,8 +1420,6 @@ function delete_forum_content($forum_id) switch (SQL_LAYER) { case 'mysql4': - // Use delete_attachments('topic', $ids, false) here... - // Select then delete all attachments $sql = 'SELECT a.topic_id FROM ' . POSTS_TABLE . ' p, ' . ATTACHMENTS_TABLE . " a diff --git a/phpBB/adm/admin_viewlogs.php b/phpBB/adm/admin_viewlogs.php index ece903bb5b..f4a8bba844 100644 --- a/phpBB/adm/admin_viewlogs.php +++ b/phpBB/adm/admin_viewlogs.php @@ -54,6 +54,11 @@ $sort_dir = request_var('sd', 'd'); // Define some vars depending on which logs we're looking at $log_type = ($mode == 'admin') ? LOG_ADMIN : (($mode == 'mod') ? LOG_MOD : LOG_CRITICAL); +if ($log_type == LOG_MOD) +{ + $user->add_lang('mcp'); +} + // Delete entries if requested and able if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) { @@ -74,7 +79,7 @@ if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs')) $where_sql"; $db->sql_query($sql); - add_log('admin', 'log_' . $mode . '_clear'); + add_log('admin', 'LOG_' . strtoupper($mode) . '_CLEAR'); } // Sorting diff --git a/phpBB/adm/admin_words.php b/phpBB/adm/admin_words.php index c53acc58dd..a13b92e1f6 100644 --- a/phpBB/adm/admin_words.php +++ b/phpBB/adm/admin_words.php @@ -74,11 +74,11 @@ switch ($mode)
lang['EDIT_WORD']; ?>
lang['WORD']; ?>:lang['WORD']; ?>:
lang['REPLACEMENT']; ?>:lang['REPLACEMENT']; ?>:
{post_review_row.KARMA_IMG}
diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subSilver/template/posting_topic_review.html index 0a29a3758e..19bdf0023f 100644 --- a/phpBB/styles/subSilver/template/posting_topic_review.html +++ b/phpBB/styles/subSilver/template/posting_topic_review.html @@ -24,9 +24,6 @@ {topic_review_row.POSTER_NAME} - - {topic_review_row.KARMA_IMG} - diff --git a/phpBB/styles/subSilver/template/viewforum_body.html b/phpBB/styles/subSilver/template/viewforum_body.html index 2916165c4e..17d6b49f7a 100644 --- a/phpBB/styles/subSilver/template/viewforum_body.html +++ b/phpBB/styles/subSilver/template/viewforum_body.html @@ -3,13 +3,14 @@ -

+

- {L_FORUM_RULES} + {L_FORUM_RULES} - {L_FORUM_RULES} + {L_FORUM_RULES}
+ {FORUM_RULES} -

+

diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html index cea26f5a47..c0dea66295 100644 --- a/phpBB/styles/subSilver/template/viewtopic_body.html +++ b/phpBB/styles/subSilver/template/viewtopic_body.html @@ -3,13 +3,14 @@ -

+

- {L_FORUM_RULES} + {L_FORUM_RULES} - {L_FORUM_RULES} + {L_FORUM_RULES}
+ {FORUM_RULES} -

+

@@ -134,9 +135,6 @@
- - - diff --git a/phpBB/ucp.php b/phpBB/ucp.php index 80d383e837..2b1e6e0a51 100755 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -301,7 +301,12 @@ switch ($mode) // Only registered users can go beyond this point if ($user->data['user_id'] == ANONYMOUS || $user->data['user_type'] == USER_INACTIVE || $user->data['user_type'] == USER_IGNORE) { - redirect("index.$phpEx"); + if ($user->data['user_id'] != ANONYMOUS) + { + redirect("index.$phpEx"); + } + + login_box($user->cur_page, '', $user->lang['LOGIN_EXPLAIN_UCP']); } diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 0cfcedc882..24a9829920 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -119,7 +119,7 @@ if ($forum_data['forum_password']) // Redirect to login upon emailed notification links if (isset($_GET['e']) && $user->data['user_id'] == ANONYMOUS) { - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])), '', $user->lang['LOGIN_NOTIFY_FORUM']); + login_box($user->cur_page, '', $user->lang['LOGIN_NOTIFY_FORUM']); } // Permissions check @@ -130,12 +130,15 @@ if (!$auth->acl_get('f_read', $forum_id)) trigger_error($user->lang['SORRY_AUTH_READ']); } - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])), '', $user->lang['LOGIN_VIEWFORUM']); + login_box($user->cur_page, '', $user->lang['LOGIN_VIEWFORUM']); } // Build navigation links generate_forum_nav($forum_data); +// Forum Rules +generate_forum_rules($forum_data); + // Do we have subforums? $active_forum_ary = $moderators = array(); @@ -198,7 +201,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) } $s_forum_rules = ''; - gen_forum_rules('forum', $forum_id); + gen_forum_auth_level('forum', $forum_id); // Topic ordering options $limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']); @@ -280,7 +283,6 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) 'S_FORUM_ACTION' => "viewforum.$phpEx$SID&f=$forum_id&start=$start", 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('f_search', $forum_id)) ? true : false, 'S_SEARCHBOX_ACTION' => "search.$phpEx$SID&f[]=$forum_id", - 'S_FORUM_RULES' => false, 'U_MCP' => ($auth->acl_gets('m_', $forum_id)) ? "mcp.$phpEx?sid=$user->session_id&f=$forum_id&mode=forum_view" : '', 'U_POST_NEW_TOPIC' => "posting.$phpEx$SID&mode=post&f=$forum_id", @@ -407,10 +409,10 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) $topic_type = ''; if ($row['topic_status'] == ITEM_MOVED) { - $topic_type = $user->lang['VIEW_TOPIC_MOVED'] . ' '; + $topic_type = $user->lang['VIEW_TOPIC_MOVED']; $topic_id = $row['topic_moved_id']; - $folder_image = 'folder'; + $folder_img = 'folder'; $folder_alt = 'Topic_Moved'; $newest_post_img = ''; } @@ -576,7 +578,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) if ((isset($row['mark_time']) && $row['topic_last_post_time'] > $row['mark_time']) || (empty($row['mark_time']) && $row['topic_last_post_time'] > $forum_data['mark_time'])) { // sync post/topic marking - if (!$unread_topic && !empty($row['mark_time']) && $row['mark_time']) + if (isset($unread_topc) && !$unread_topic && !empty($row['mark_time']) && $row['mark_time']) { markread('topic', $forum_id, $topic_id); } @@ -609,7 +611,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16) // on all topics (as we do in 2.0.x). It looks for unread or new topics, if it doesn't find // any it updates the forum last read cookie. This requires that the user visit the forum // after reading a topic - if ($forum_data['forum_type'] == FORUM_POST && $user->data['user_id'] != ANONYMOUS && $mark_forum_read) + if ($forum_data['forum_type'] == FORUM_POST && $user->data['user_id'] != ANONYMOUS && count($topic_list) && $mark_forum_read) { markread('mark', $forum_id); } diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 0631a6d0a4..5224eda215 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -162,7 +162,7 @@ if ($user->data['user_id'] != ANONYMOUS) // whereupon we join on the forum_id passed as a parameter ... this // is done so navigation, forum name, etc. remain consistent with where // user clicked to view a global topic -$sql = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_attachment, t.topic_status, t.topic_approved, ' . (($auth->acl_get('m_approve')) ? 't.topic_replies_real AS topic_replies' : 't.topic_replies') . ', t.topic_last_post_id, t.topic_last_poster_id, t.topic_last_post_time, t.topic_poster, t.topic_time, t.topic_time_limit, t.topic_type, t.topic_bumped, t.topic_bumper, t.poll_max_options, t.poll_start, t.poll_length, t.poll_title, f.forum_name, f.forum_desc, f.forum_parents, f.parent_id, f.left_id, f.right_id, f.forum_status, f.forum_type, f.forum_id, f.forum_style, f.forum_password' . $extra_fields . ' +$sql = 'SELECT t.topic_id, t.forum_id, t.topic_title, t.topic_attachment, t.topic_status, t.topic_approved, ' . (($auth->acl_get('m_approve')) ? 't.topic_replies_real AS topic_replies' : 't.topic_replies') . ', t.topic_last_post_id, t.topic_last_poster_id, t.topic_last_post_time, t.topic_poster, t.topic_time, t.topic_time_limit, t.topic_type, t.topic_bumped, t.topic_bumper, t.poll_max_options, t.poll_start, t.poll_length, t.poll_title, f.forum_name, f.forum_desc, f.forum_parents, f.parent_id, f.left_id, f.right_id, f.forum_status, f.forum_type, f.forum_id, f.forum_style, f.forum_password, f.forum_rules, f.forum_rules_link, f.forum_rules_flags' . $extra_fields . ' FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f' . $join_sql_table . " WHERE $join_sql AND (f.forum_id = t.forum_id @@ -236,7 +236,7 @@ if (!$auth->acl_get('f_read', $forum_id)) trigger_error($user->lang['SORRY_AUTH_READ']); } - login_box(preg_replace('#.*?([a-z]+?\.' . $phpEx . '.*?)$#i', '\1', htmlspecialchars($_SERVER['REQUEST_URI'])), '', $user->lang['LOGIN_VIEWFORUM']); + login_box($user->cur_page, '', $user->lang['LOGIN_VIEWFORUM']); } // Forum is passworded ... check whether access has been granted to this @@ -334,7 +334,7 @@ if ($hilit_words) // Forum rules listing $s_forum_rules = ''; -gen_forum_rules('topic', $forum_id); +gen_forum_auth_level('topic', $forum_id); // Quick mod tools $topic_mod = ''; @@ -357,6 +357,9 @@ $pagination = generate_pagination($pagination_url, $total_posts, $config['posts_ // Navigation links generate_forum_nav($topic_data); +// Forum Rules +generate_forum_rules($topic_data); + // Moderators $forum_moderators = array(); get_moderators($forum_moderators, $forum_id); @@ -663,7 +666,7 @@ while ($row = $db->sql_fetchrow($result)) if ($row['foe']) { $rowset[$row['post_id']] = array( - 'foe' => TRUE, + 'foe' => true, 'post_id' => $row['post_id'], 'poster' => $poster, ); @@ -728,8 +731,6 @@ while ($row = $db->sql_fetchrow($result)) 'joined' => '', 'posts' => '', 'from' => '', - 'karma' => 0, - 'karma_img' => '', 'sig' => '', 'sig_bbcode_uid' => '', @@ -971,7 +972,7 @@ for ($i = 0; $i < count($post_list); ++$i) // i) The posters karma is below the minimum of the user ... not in 2.2.x // ii) The poster is on the users ignore list // iii) The post was made in a codepage different from the users - if ($row['foe']) + if (isset($row['foe']) && $row['foe']) { $template->assign_block_vars('postrow', array( 'S_IGNORE_POST' => true,
{postrow.KARMA_IMG}
{postrow.ONLINE_IMG}