aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-04-29 12:30:22 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-04-29 12:30:22 +0000
commit290187c6c79d069ea669384c515ba38965ff1002 (patch)
treeb19f7a3ee1413b8405cbf9e3ce221a19080491ea
parentc262c4addbb8d18fdd3a84d0a4b64dd9899320c0 (diff)
downloadforums-290187c6c79d069ea669384c515ba38965ff1002.tar
forums-290187c6c79d069ea669384c515ba38965ff1002.tar.gz
forums-290187c6c79d069ea669384c515ba38965ff1002.tar.bz2
forums-290187c6c79d069ea669384c515ba38965ff1002.tar.xz
forums-290187c6c79d069ea669384c515ba38965ff1002.zip
more bugfixing. Important change: admins able to give ban reason for user quick tool ban - logging also syndicated, now always logged to ACP and MCP logs.
git-svn-id: file:///svn/phpbb/trunk@7426 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/adm/style/acp_users_overview.html210
-rw-r--r--phpBB/includes/acp/acp_users.php14
-rw-r--r--phpBB/includes/functions_user.php12
-rw-r--r--phpBB/includes/ucp/ucp_main.php397
-rw-r--r--phpBB/language/en/acp/common.php4
-rw-r--r--phpBB/language/en/help_faq.php2
-rw-r--r--phpBB/language/en/posting.php4
-rw-r--r--phpBB/language/en/ucp.php2
-rw-r--r--phpBB/styles/prosilver/template/memberlist_view.html8
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html4
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_subscribed.html107
-rwxr-xr-xphpBB/ucp.php6
12 files changed, 425 insertions, 345 deletions
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index ccff69424c..5a794b343a 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -1,94 +1,142 @@
- <form id="user_overview" method="post" action="{U_ACTION}">
+<form id="user_overview" method="post" action="{U_ACTION}">
- <fieldset>
- <legend>{L_ACP_USER_OVERVIEW}</legend>
- <dl>
- <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
- <dd><input type="text" id="user" name="user" value="{USER}" /></dd>
- <!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF -->
- </dl>
- <!-- IF S_USER_INACTIVE -->
- <dl>
- <dt><label>{L_USER_IS_INACTIVE}:</label></dt>
- <dd><strong>{USER_INACTIVE_REASON}</strong></dd>
- </dl>
- <!-- ENDIF -->
- <dl>
- <dt><label>{L_REGISTERED}:</label></dt>
- <dd><strong>{USER_REGISTERED}</strong></dd>
- </dl>
- <!-- IF S_USER_IP -->
- <dl>
- <dt><label>{L_REGISTERED_IP}:</label></dt>
- <dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd>
- <dd>[ <a href="#" onclick="window.open('{U_WHOIS}', '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</dd>
- </dl>
- <!-- ENDIF -->
- <dl>
- <dt><label>{L_LAST_ACTIVE}:</label></dt>
- <dd><strong>{USER_LASTACTIVE}</strong></dd>
- </dl>
- <dl>
- <dt><label>{L_POSTS}:</label></dt>
- <dd><strong>{USER_POSTS}</strong></dd>
- </dl>
- <dl>
- <dt><label>{L_WARNINGS}:</label></dt>
- <dd><strong>{USER_WARNINGS}</strong></dd>
- </dl>
- <dl>
- <dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
- <dd><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp; <input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_NO}&nbsp;</dd>
- </dl>
- <dl>
- <dt><label for="user_email">{L_EMAIL}:</label></dt>
- <dd><input class="medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" /></dd>
- </dl>
- <dl>
- <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
- <dd><input class="medium" type="text" id="email_confirm" name="email_confirm" value="" /></dd>
- </dl>
- <dl>
- <dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
- <dd><input type="password" id="new_password" name="new_password" value="" /></dd>
- </dl>
- <dl>
- <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
- <dd><input type="password" id="password_confirm" name="password_confirm" value="" /></dd>
- </dl>
+<fieldset>
+ <legend>{L_ACP_USER_OVERVIEW}</legend>
+<dl>
+ <dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
+ <dd><input type="text" id="user" name="user" value="{USER}" /></dd>
+ <!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF -->
+</dl>
+<!-- IF S_USER_INACTIVE -->
+<dl>
+ <dt><label>{L_USER_IS_INACTIVE}:</label></dt>
+ <dd><strong>{USER_INACTIVE_REASON}</strong></dd>
+</dl>
+<!-- ENDIF -->
+<dl>
+ <dt><label>{L_REGISTERED}:</label></dt>
+ <dd><strong>{USER_REGISTERED}</strong></dd>
+</dl>
+<!-- IF S_USER_IP -->
+<dl>
+ <dt><label>{L_REGISTERED_IP}:</label></dt>
+ <dd><a href="{U_SHOW_IP}">{REGISTERED_IP}</a></dd>
+ <dd>[ <a href="#" onclick="window.open('{U_WHOIS}', '_whois', 'height=500, resizable=yes, scrollbars=yes, width=700'); return false;">{L_WHOIS}</a> ]</dd>
+</dl>
+<!-- ENDIF -->
+<dl>
+ <dt><label>{L_LAST_ACTIVE}:</label></dt>
+ <dd><strong>{USER_LASTACTIVE}</strong></dd>
+</dl>
+<dl>
+ <dt><label>{L_POSTS}:</label></dt>
+ <dd><strong>{USER_POSTS}</strong></dd>
+</dl>
+<dl>
+ <dt><label>{L_WARNINGS}:</label></dt>
+ <dd><strong>{USER_WARNINGS}</strong></dd>
+</dl>
+<dl>
+ <dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
+ <dd><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp; <input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_NO}&nbsp;</dd>
+</dl>
+<dl>
+ <dt><label for="user_email">{L_EMAIL}:</label></dt>
+ <dd><input class="medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" /></dd>
+</dl>
+<dl>
+ <dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
+ <dd><input class="medium" type="text" id="email_confirm" name="email_confirm" value="" /></dd>
+</dl>
+<dl>
+ <dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="new_password" name="new_password" value="" /></dd>
+</dl>
+<dl>
+ <dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label><br /><span>{L_CONFIRM_PASSWORD_EXPLAIN}</span></dt>
+ <dd><input type="password" id="password_confirm" name="password_confirm" value="" /></dd>
+</dl>
- <p class="quick">
- <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
- <input type="hidden" name="action" value="" />
- </p>
+<p class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ <input type="hidden" name="action" value="" />
+</p>
- </fieldset>
+</fieldset>
- </form>
+</form>
+
+<!-- IF not S_USER_FOUNDER or S_FOUNDER -->
+
+ <script type="text/javascript">
+ <!--
+
+ function display_reason(option)
+ {
+ if (option != 'banuser' && option != 'banemail' && option != 'banip')
+ {
+ dE('reasons', -1);
+ return;
+ }
+
+ dE('reasons', 1);
+
+ element = document.getElementById('user_quick_tools').ban_reason;
+
+ if (element.value && element.value != '{LA_USER_ADMIN_BAN_NAME_REASON}' && element.value != '{LA_USER_ADMIN_BAN_EMAIL_REASON}' && element.value != '{LA_USER_ADMIN_BAN_IP_REASON}')
+ {
+ return;
+ }
- <!-- IF not S_USER_FOUNDER or S_FOUNDER -->
- <form id="user_quick_tools" method="post" action="{U_ACTION}">
+ if (option == 'banuser')
+ {
+ element.value = '{LA_USER_ADMIN_BAN_NAME_REASON}';
+ }
+ else if (option == 'banemail')
+ {
+ element.value = '{LA_USER_ADMIN_BAN_EMAIL_REASON}';
+ }
+ else if (option == 'banip')
+ {
+ element.value = '{LA_USER_ADMIN_BAN_IP_REASON}';
+ }
+ }
- <fieldset>
- <legend>{L_USER_TOOLS}</legend>
+ //-->
+ </script>
+
+ <form id="user_quick_tools" method="post" action="{U_ACTION}">
+
+ <fieldset>
+ <legend>{L_USER_TOOLS}</legend>
+ <dl>
+ <dt><label for="quicktools">{L_QUICK_TOOLS}:</label></dt>
+ <dd><select id="quicktools" name="action" onchange="display_reason(this.options[this.selectedIndex].value);">{S_ACTION_OPTIONS}</select></dd>
+ </dl>
+ <div style="display: none;" id="reasons">
<dl>
- <dt><label for="quicktools">{L_QUICK_TOOLS}:</label></dt>
- <dd><select id="quicktools" name="action">{S_ACTION_OPTIONS}</select></dd>
+ <dt><label for="ban_reason">{L_BAN_REASON}:</label></dt>
+ <dd><input name="ban_reason" type="text" id="ban_reason" class="medium" maxlength="3000" /></dd>
</dl>
- <!-- IF not S_OWN_ACCOUNT -->
- <dl>
- <dt><label for="delete_user">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
- <dd><input type="checkbox" class="radio" name="delete" value="1" /></dd>
- <dd><select id="delete_user" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
- </dl>
- <!-- ENDIF -->
+ <dl>
+ <dt><label for="ban_give_reason">{L_BAN_GIVE_REASON}:</label></dt>
+ <dd><input name="ban_give_reason" type="text" id="ban_give_reason" class="medium" maxlength="3000" /></dd>
+ </dl>
+ </div>
+ <!-- IF not S_OWN_ACCOUNT -->
+ <dl>
+ <dt><label for="delete_user">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
+ <dd><input type="checkbox" class="radio" name="delete" value="1" /></dd>
+ <dd><select id="delete_user" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
+ </dl>
+ <!-- ENDIF -->
- <p class="quick">
- <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
- </p>
+ <p class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ </p>
- </fieldset>
+ </fieldset>
</form>
- <!-- ENDIF -->
+<!-- ENDIF -->
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index fd76f0ee35..db6c1f83e3 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -147,7 +147,9 @@ class acp_users
switch ($mode)
{
case 'overview':
-
+
+ $user->add_lang('acp/ban');
+
$delete = request_var('delete', 0);
$delete_type = request_var('delete_type', '');
$ip = request_var('ip', 'ip');
@@ -246,10 +248,11 @@ class acp_users
break;
}
- user_ban(substr($action, 3), $ban, 0, 0, 0, $user->lang[$reason]);
+ $ban_reason = request_var('ban_reason', $user->lang[$reason], true);
+ $ban_give_reason = request_var('ban_give_reason', '', true);
- add_log('admin', $log, $user->lang[$reason], implode(', ', $ban));
- add_log('user', $user_id, $log, $user->lang[$reason], implode(', ', $ban));
+ // Log not used at the moment, we simply utilize the ban function.
+ user_ban(substr($action, 3), $ban, 0, 0, 0, $ban_reason, $ban_give_reason);
trigger_error($user->lang['BAN_SUCCESSFUL'] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
@@ -837,8 +840,7 @@ class acp_users
'USER_WARNINGS' => $user_row['user_warnings'],
'USER_POSTS' => $user_row['user_posts'],
'USER_INACTIVE_REASON' => $inactive_reason,
- )
- );
+ ));
break;
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 6ca04eb134..02665810ac 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -946,7 +946,10 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
// Update log
$log_entry = ($ban_exclude) ? 'LOG_BAN_EXCLUDE_' : 'LOG_BAN_';
+
+ // Add to moderator and admin log
add_log('admin', $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
+ add_log('mod', 0, 0, $log_entry . strtoupper($mode), $ban_reason, $ban_list_log);
return true;
}
@@ -1012,7 +1015,9 @@ function user_unban($mode, $ban)
WHERE ' . $db->sql_in_set('ban_id', $unban_sql);
$db->sql_query($sql);
+ // Add to moderator and admin log
add_log('admin', 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list);
+ add_log('mod', 0, 0, 'LOG_UNBAN_' . strtoupper($mode), $l_unban_list);
}
return false;
@@ -1147,13 +1152,18 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
*
* @return boolean|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended)
*/
-function validate_match($string, $optional = false, $match)
+function validate_match($string, $optional = false, $match = '')
{
if (empty($string) && $optional)
{
return false;
}
+ if (empty($match))
+ {
+ return false;
+ }
+
if (!preg_match($match, $string))
{
return 'WRONG_DATA';
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 60573aa7fd..8e84e1a2db 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -231,245 +231,256 @@ class ucp_main
}
}
- $sql_array = array(
- 'SELECT' => 'f.*',
-
- 'FROM' => array(
- FORUMS_WATCH_TABLE => 'fw',
- FORUMS_TABLE => 'f'
- ),
-
- 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
- AND f.forum_id = fw.forum_id',
-
- 'ORDER_BY' => 'left_id'
- );
-
- if ($config['load_db_lastread'])
+ if ($config['allow_forum_notify'])
{
- $sql_array['LEFT_JOIN'] = array(
- array(
- 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
- 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
- )
- );
+ $sql_array = array(
+ 'SELECT' => 'f.*',
- $sql_array['SELECT'] .= ', ft.mark_time ';
- }
- else
- {
- $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
- $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
- }
+ 'FROM' => array(
+ FORUMS_WATCH_TABLE => 'fw',
+ FORUMS_TABLE => 'f'
+ ),
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query($sql);
+ 'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
+ AND f.forum_id = fw.forum_id',
- while ($row = $db->sql_fetchrow($result))
- {
- $forum_id = $row['forum_id'];
+ 'ORDER_BY' => 'left_id'
+ );
if ($config['load_db_lastread'])
{
- $forum_check = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark'];
- }
- else
- {
- $forum_check = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
- }
-
- $unread_forum = ($row['forum_last_post_time'] > $forum_check) ? true : false;
-
- // Which folder should we display?
- if ($row['forum_status'] == ITEM_LOCKED)
- {
- $folder_image = ($unread_forum) ? 'forum_unread_locked' : 'forum_read_locked';
- $folder_alt = 'FORUM_LOCKED';
- }
- else
- {
- $folder_image = ($unread_forum) ? 'forum_unread' : 'forum_read';
- $folder_alt = ($unread_forum) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
- }
+ $sql_array['LEFT_JOIN'] = array(
+ array(
+ 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
+ 'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
+ )
+ );
- // Create last post link information, if appropriate
- if ($row['forum_last_post_id'])
- {
- $last_post_time = $user->format_date($row['forum_last_post_time']);
- $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
+ $sql_array['SELECT'] .= ', ft.mark_time ';
}
else
{
- $last_post_time = $last_post_url = '';
+ $tracking_topics = (isset($_COOKIE[$config['cookie_name'] . '_track'])) ? ((STRIP) ? stripslashes($_COOKIE[$config['cookie_name'] . '_track']) : $_COOKIE[$config['cookie_name'] . '_track']) : '';
+ $tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
}
- $template->assign_block_vars('forumrow', array(
- 'FORUM_ID' => $forum_id,
- 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
- 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
- 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
- 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
- 'FORUM_NAME' => $row['forum_name'],
- 'LAST_POST_SUBJECT' => $row['forum_last_post_subject'],
- 'LAST_POST_TIME' => $last_post_time,
-
- 'LAST_POST_AUTHOR' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
- 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
- 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
- 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
-
- 'U_LAST_POST' => $last_post_url,
- 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
- );
- }
- $db->sql_freeresult($result);
-
- // Subscribed Topics
- $start = request_var('start', 0);
-
- $sql = 'SELECT COUNT(topic_id) as topics_count
- FROM ' . TOPICS_WATCH_TABLE . '
- WHERE user_id = ' . $user->data['user_id'];
- $result = $db->sql_query($sql);
- $topics_count = (int) $db->sql_fetchfield('topics_count');
- $db->sql_freeresult($result);
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query($sql);
- if ($topics_count)
- {
- $template->assign_vars(array(
- 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start),
- 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
- 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count))
- );
- }
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $forum_id = $row['forum_id'];
- $sql_array = array(
- 'SELECT' => 't.*',
+ if ($config['load_db_lastread'])
+ {
+ $forum_check = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark'];
+ }
+ else
+ {
+ $forum_check = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
+ }
- 'FROM' => array(
- TOPICS_WATCH_TABLE => 'tw',
- TOPICS_TABLE => 't'
- ),
+ $unread_forum = ($row['forum_last_post_time'] > $forum_check) ? true : false;
- 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . '
- AND t.topic_id = tw.topic_id',
+ // Which folder should we display?
+ if ($row['forum_status'] == ITEM_LOCKED)
+ {
+ $folder_image = ($unread_forum) ? 'forum_unread_locked' : 'forum_read_locked';
+ $folder_alt = 'FORUM_LOCKED';
+ }
+ else
+ {
+ $folder_image = ($unread_forum) ? 'forum_unread' : 'forum_read';
+ $folder_alt = ($unread_forum) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
+ }
- 'ORDER_BY' => 't.topic_last_post_time DESC'
- );
+ // Create last post link information, if appropriate
+ if ($row['forum_last_post_id'])
+ {
+ $last_post_time = $user->format_date($row['forum_last_post_time']);
+ $last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;p=" . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
+ }
+ else
+ {
+ $last_post_time = $last_post_url = '';
+ }
- if ($config['load_db_lastread'])
- {
- $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
- $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']);
- $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time';
+ $template->assign_block_vars('forumrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
+ 'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
+ 'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
+ 'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
+ 'FORUM_NAME' => $row['forum_name'],
+ 'LAST_POST_SUBJECT' => $row['forum_last_post_subject'],
+ 'LAST_POST_TIME' => $last_post_time,
+
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
+
+ 'U_LAST_POST' => $last_post_url,
+ 'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
+ );
+ }
+ $db->sql_freeresult($result);
}
- if ($config['load_db_track'])
+ // Subscribed Topics
+ if ($config['allow_topic_notify'])
{
- $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']);
- $sql_array['SELECT'] .= ', tp.topic_posted';
- }
+ $start = request_var('start', 0);
+
+ $sql = 'SELECT COUNT(topic_id) as topics_count
+ FROM ' . TOPICS_WATCH_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $result = $db->sql_query($sql);
+ $topics_count = (int) $db->sql_fetchfield('topics_count');
+ $db->sql_freeresult($result);
- $sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
+ if ($topics_count)
+ {
+ $template->assign_vars(array(
+ 'PAGINATION' => generate_pagination($this->u_action, $topics_count, $config['topics_per_page'], $start),
+ 'PAGE_NUMBER' => on_page($topics_count, $config['topics_per_page'], $start),
+ 'TOTAL_TOPICS' => ($topics_count == 1) ? $user->lang['VIEW_FORUM_TOPIC'] : sprintf($user->lang['VIEW_FORUM_TOPICS'], $topics_count))
+ );
+ }
- $topic_list = $topic_forum_list = $global_announce_list = $rowset = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $topic_list[] = $row['topic_id'];
- $rowset[$row['topic_id']] = $row;
+ $sql_array = array(
+ 'SELECT' => 't.*',
- $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0;
- $topic_forum_list[$row['forum_id']]['topics'][] = $row['topic_id'];
+ 'FROM' => array(
+ TOPICS_WATCH_TABLE => 'tw',
+ TOPICS_TABLE => 't'
+ ),
- if ($row['topic_type'] == POST_GLOBAL)
- {
- $global_announce_list[] = $row['topic_id'];
- }
- }
- $db->sql_freeresult($result);
+ 'WHERE' => 'tw.user_id = ' . $user->data['user_id'] . '
+ AND t.topic_id = tw.topic_id',
- $topic_tracking_info = array();
- if ($config['load_db_lastread'])
- {
- foreach ($topic_forum_list as $f_id => $topic_row)
+ 'ORDER_BY' => 't.topic_last_post_time DESC'
+ );
+
+ if ($config['load_db_lastread'])
{
- $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false);
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(FORUMS_TRACK_TABLE => 'ft'), 'ON' => 'ft.forum_id = t.forum_id AND ft.user_id = ' . $user->data['user_id']);
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TRACK_TABLE => 'tt'), 'ON' => 'tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id']);
+ $sql_array['SELECT'] .= ', tt.mark_time, ft.mark_time AS forum_mark_time';
}
- }
- else
- {
- foreach ($topic_forum_list as $f_id => $topic_row)
+
+ if ($config['load_db_track'])
{
- $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list);
+ $sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_POSTED_TABLE => 'tp'), 'ON' => 'tp.topic_id = t.topic_id AND tp.user_id = ' . $user->data['user_id']);
+ $sql_array['SELECT'] .= ', tp.topic_posted';
}
- }
- foreach ($topic_list as $topic_id)
- {
- $row = &$rowset[$topic_id];
+ $sql = $db->sql_build_query('SELECT', $sql_array);
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
- $forum_id = $row['forum_id'];
- $topic_id = $row['topic_id'];
+ $topic_list = $topic_forum_list = $global_announce_list = $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $topic_list[] = $row['topic_id'];
+ $rowset[$row['topic_id']] = $row;
- $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
+ $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0;
+ $topic_forum_list[$row['forum_id']]['topics'][] = $row['topic_id'];
- // Replies
- $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
+ if ($row['topic_type'] == POST_GLOBAL)
+ {
+ $global_announce_list[] = $row['topic_id'];
+ }
+ }
+ $db->sql_freeresult($result);
- if ($row['topic_status'] == ITEM_MOVED)
+ $topic_tracking_info = array();
+ if ($config['load_db_lastread'])
{
- $topic_id = $row['topic_moved_id'];
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false);
+ }
+ }
+ else
+ {
+ foreach ($topic_forum_list as $f_id => $topic_row)
+ {
+ $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list);
+ }
}
- // Get folder img, topic status/type related information
- $folder_img = $folder_alt = $topic_type = '';
- topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
-
- $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id");
-
- // Send vars to template
- $template->assign_block_vars('topicrow', array(
- 'FORUM_ID' => $forum_id,
- 'TOPIC_ID' => $topic_id,
- 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
- 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
- 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
- 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
-
- 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
- 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
- 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
- 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ foreach ($topic_list as $topic_id)
+ {
+ $row = &$rowset[$topic_id];
- 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
- 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
- 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
- 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ $forum_id = $row['forum_id'];
+ $topic_id = $row['topic_id'];
- 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id")),
- 'REPLIES' => $replies,
- 'VIEWS' => $row['topic_views'],
- 'TOPIC_TITLE' => censor_text($row['topic_title']),
- 'TOPIC_TYPE' => $topic_type,
+ $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
- 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
- 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
- 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
- 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
- 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
- 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+ // Replies
+ $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
- 'S_TOPIC_TYPE' => $row['topic_type'],
- 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
- 'S_UNREAD_TOPIC' => $unread_topic,
+ if ($row['topic_status'] == ITEM_MOVED)
+ {
+ $topic_id = $row['topic_moved_id'];
+ }
- 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
- 'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
- 'U_VIEW_TOPIC' => $view_topic_url,
- ));
+ // Get folder img, topic status/type related information
+ $folder_img = $folder_alt = $topic_type = '';
+ topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
+
+ $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id");
+
+ // Send vars to template
+ $template->assign_block_vars('topicrow', array(
+ 'FORUM_ID' => $forum_id,
+ 'TOPIC_ID' => $topic_id,
+ 'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
+ 'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
+ 'LAST_POST_TIME' => $user->format_date($row['topic_last_post_time']),
+ 'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
+
+ 'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+ 'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
+
+ 'LAST_POST_AUTHOR' => get_username_string('username', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'LAST_POST_AUTHOR_FULL' => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+ 'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
+
+ 'PAGINATION' => topic_generate_pagination($replies, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . "&amp;t=$topic_id")),
+ 'REPLIES' => $replies,
+ 'VIEWS' => $row['topic_views'],
+ 'TOPIC_TITLE' => censor_text($row['topic_title']),
+ 'TOPIC_TYPE' => $topic_type,
+
+ 'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
+ 'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
+ 'TOPIC_ICON_IMG' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['img'] : '',
+ 'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['width'] : '',
+ 'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row['icon_id']])) ? $icons[$row['icon_id']]['height'] : '',
+ 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
+
+ 'S_TOPIC_TYPE' => $row['topic_type'],
+ 'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
+ 'S_UNREAD_TOPIC' => $unread_topic,
+
+ 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
+ 'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
+ 'U_VIEW_TOPIC' => $view_topic_url,
+ ));
+ }
}
+ $template->assign_vars(array(
+ 'S_TOPIC_NOTIFY' => $config['allow_topic_notify'],
+ 'S_FORUM_NOTIFY' => $config['allow_forum_notify'],
+ ));
+
break;
case 'bookmarks':
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index c062173e29..c9a541696c 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -281,8 +281,8 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACP_ADMIN_LOGS_EXPLAIN' => 'This lists all the actions carried out by board administrators. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of emails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
- 'ACP_MOD_LOGS_EXPLAIN' => 'This lists the actions carried out by board moderators, select a forum from the drop down list. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
- 'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users.',
+ 'ACP_MOD_LOGS_EXPLAIN' => 'This lists all actions done on forums, topics and posts as well as actions carried out on users by moderators, including banning. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
+ 'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users (warnings and user notes).',
'ALL_ENTRIES' => 'All entries',
'DISPLAY_LOG' => 'Display entries from previous',
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
index 750819ef5d..86323c2330 100644
--- a/phpBB/language/en/help_faq.php
+++ b/phpBB/language/en/help_faq.php
@@ -120,7 +120,7 @@ $help = array(
),
array(
0 => 'How do I create a poll?',
- 1 => 'Creating a poll is easy, when you post a new topic (or edit the first post of a topic, if you have permission) you should see the “Poll creation” tab below the main posting form (if you cannot see this then you do not have appropriate permissions to create polls). You should enter a title for the poll in “Poll question” and then at least two options in the “Poll options” textarea (limit is set by the board administrator), with each option separated by a new line. You can also set the number of options user may select during voting under “Options per user”, setting a time limit in days for the poll (0 is a poll of infinite duration) and lastly the option if users are allowed to amend their votes.'
+ 1 => 'Creating a poll is easy, when you post a new topic (or edit the first post of a topic, if you have permission) you should see the “Poll creation” tab below the main posting form (if you cannot see this then you do not have appropriate permissions to create polls). You should enter a title for the poll in “Poll question” and then at least two options in the “Poll options” textarea (limit is set by the board administrator), with each option separated by a new line. You can also set the number of options users may select during voting under “Options per user”, setting a time limit in days for the poll (0 is a poll of infinite duration) and lastly the option if users are allowed to amend their votes.'
),
array(
0 => 'How do I edit or delete a poll?',
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 970bcbd40b..94f7cdfb3f 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -152,14 +152,14 @@ $lang = array_merge($lang, array(
'POST_CONFIRM_EXPLAIN' => 'To prevent automated posts the board administrator requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
'POST_DELETED' => 'This message has been deleted successfully',
'POST_EDITED' => 'This message has been edited successfully',
- 'POST_EDITED_MOD' => 'This message has been edited but requires approval',
+ 'POST_EDITED_MOD' => 'This message has been edited successfully, but it will need to be approved by a moderator before it is publicly viewable. You will be notified when your post has been approved.',
'POST_GLOBAL' => 'Global',
'POST_ICON' => 'Post icon',
'POST_NORMAL' => 'Normal',
'POST_REVIEW' => 'Post review',
'POST_REVIEW_EXPLAIN' => 'At least one new post has been made to this topic. You may wish to review your post in light of this.',
'POST_STORED' => 'This message has been posted successfully',
- 'POST_STORED_MOD' => 'This message has been saved but requires approval',
+ 'POST_STORED_MOD' => 'This message has been submitted successfully, but it will need to be approved by a moderator before it is publicly viewable. You will be notified when your post has been approved.',
'POST_TOPIC_AS' => 'Post topic as',
'PROGRESS_BAR' => 'Progress bar',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 0718e744c5..71c9b5a31e 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -411,7 +411,7 @@ $lang = array_merge($lang, array(
'UCP_PM' => 'Private messages',
'UCP_PM_COMPOSE' => 'Compose message',
'UCP_PM_DRAFTS' => 'Manage PM drafts',
- 'UCP_PM_OPTIONS' => 'Rules, folder &amp; settings',
+ 'UCP_PM_OPTIONS' => 'Rules, folders &amp; settings',
'UCP_PM_POPUP' => 'Private messages',
'UCP_PM_POPUP_TITLE' => 'Private message popup',
'UCP_PM_UNREAD' => 'Unread messages',
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
index a9408c3cab..5b50f74689 100644
--- a/phpBB/styles/prosilver/template/memberlist_view.html
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -60,13 +60,13 @@
<!-- BEGIN custom_fields --><dt>{custom_fields.PROFILE_FIELD_NAME}:</dt> <dd>{custom_fields.PROFILE_FIELD_VALUE}</dd><!-- END custom_fields -->
<!-- IF S_USER_LOGGED_IN and S_ZEBRA -->
<!-- IF U_ADD_FRIEND and U_ADD_FOE-->
- <dt><strong>&hearts;</strong></dt> <dd><a href="{U_ADD_FRIEND}"><strong>{L_ADD_FRIEND}</strong></a></dd>
- <dt><strong>&times;</strong></dt> <dd><a href="{U_ADD_FOE}"><strong>{L_ADD_FOE}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd><a href="{U_ADD_FRIEND}"><strong>{L_ADD_FRIEND}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd><a href="{U_ADD_FOE}"><strong>{L_ADD_FOE}</strong></a></dd>
<!-- ELSE -->
<!-- IF U_REMOVE_FRIEND -->
- <dt><strong>&hearts;</strong></dt> <dd><a href="{U_REMOVE_FRIEND}"><strong>{L_REMOVE_FRIEND}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd><a href="{U_REMOVE_FRIEND}"><strong>{L_REMOVE_FRIEND}</strong></a></dd>
<!-- ELSE -->
- <dt><strong>&times;</strong></dt> <dd><a href="{U_REMOVE_FOE}"><strong>{L_REMOVE_FOE}</strong></a></dd>
+ <dt>&nbsp;</dt> <dd><a href="{U_REMOVE_FOE}"><strong>{L_REMOVE_FOE}</strong></a></dd>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index 3d29923637..bf49116652 100644
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -32,7 +32,7 @@
</li>
<!-- END forumrow -->
</ul>
-<!-- ELSE -->
+<!-- ELSEIF S_FORUM_NOTIFY -->
<p><strong>{L_NO_WATCHED_FORUMS}</strong></p>
<!-- ENDIF -->
@@ -72,7 +72,7 @@
<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
</li>
</ul>
-<!-- ELSE -->
+<!-- ELSEIF S_TOPIC_NOTIFY -->
<p><strong>{L_NO_WATCHED_TOPICS}</strong></p>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
index 6565588ad2..b549daaf87 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
@@ -7,65 +7,68 @@
<tr>
<td class="row1" colspan="4" align="center"><span class="genmed">{L_WATCHED_EXPLAIN}</span></td>
</tr>
-<tr>
- <th colspan="4">{L_WATCHED_FORUMS}</th>
-</tr>
-
-<!-- BEGIN forumrow -->
-
- <!-- IF forumrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td style="padding: 4px;" width="20" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
- <td style="padding: 4px;" width="100%"><p class="topictitle"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></p></td>
- <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR_FULL} <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td>
- <td style="padding: 4px;"> <input type="checkbox" class="radio" name="f[{forumrow.FORUM_ID}]" /> </td>
- </tr>
-<!-- BEGINELSE -->
- <tr class="row1">
- <td colspan="4" align="center"><b class="genmed">{L_NO_WATCHED_FORUMS}</b></td>
+<!-- IF S_FORUM_NOTIFY -->
+ <tr>
+ <th colspan="4">{L_WATCHED_FORUMS}</th>
</tr>
-<!-- END forumrow -->
-<tr>
- <th colspan="4">{L_WATCHED_TOPICS}</th>
-</tr>
+ <!-- BEGIN forumrow -->
-<!-- IF TOTAL_TOPICS -->
+ <!-- IF forumrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="padding: 4px;" width="20" align="center" valign="middle">{forumrow.FORUM_FOLDER_IMG}</td>
+ <td style="padding: 4px;" width="100%"><p class="topictitle"><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a></p></td>
+ <td class="gensmall" style="padding: 4px;" align="center" valign="middle" nowrap="nowrap"><!-- IF forumrow.LAST_POST_TIME -->{forumrow.LAST_POST_TIME}<br />{forumrow.LAST_POST_AUTHOR_FULL} <a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></td>
+ <td style="padding: 4px;"> <input type="checkbox" class="radio" name="f[{forumrow.FORUM_ID}]" /> </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="4" align="center"><b class="genmed">{L_NO_WATCHED_FORUMS}</b></td>
+ </tr>
+ <!-- END forumrow -->
+<!-- ENDIF -->
+<!-- IF S_TOPIC_NOTIFY -->
<tr>
- <td class="row3" colspan="4">
- <table width="100%" cellspacing="1">
- <tr>
- <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
- <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]&nbsp;</td>
- <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
- </tr>
- </table>
- </td>
+ <th colspan="4">{L_WATCHED_TOPICS}</th>
</tr>
-<!-- ENDIF -->
-<!-- BEGIN topicrow -->
+ <!-- IF TOTAL_TOPICS -->
+ <tr>
+ <td class="row3" colspan="4">
+ <table width="100%" cellspacing="1">
+ <tr>
+ <td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}<br /></td>
+ <td class="gensmall" nowrap="nowrap">&nbsp;[ {TOTAL_TOPICS} ]&nbsp;</td>
+ <td class="gensmall" width="100%" align="{S_CONTENT_FLOW_END}" nowrap="nowrap"><!-- INCLUDE pagination.html --></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- ENDIF -->
- <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
- <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
- <td style="padding: 4px;" width="100%" valign="top">
- <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p><br />
- <!-- IF topicrow.PAGINATION -->
- <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
- <!-- ENDIF -->
- </td>
- <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">
- <p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
- <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
- <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
- </p>
- </td>
- <td style="padding: 4px;"> <input type="checkbox" class="radio" name="t[{topicrow.TOPIC_ID}]" /> </td>
- </tr>
-<!-- BEGINELSE -->
- <tr class="row1">
- <td colspan="4" align="center"><b class="genmed">{L_NO_WATCHED_TOPICS}</b></td>
- </tr>
-<!-- END topicrow -->
+ <!-- BEGIN topicrow -->
+
+ <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
+ <td style="padding: 4px;" width="100%" valign="top">
+ <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p><br />
+ <!-- IF topicrow.PAGINATION -->
+ <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}: {topicrow.PAGINATION} ] </p>
+ <!-- ENDIF -->
+ </td>
+ <td style="padding: 4px;" align="{S_CONTENT_FLOW_BEGIN}" valign="top" nowrap="nowrap">
+ <p class="topicdetails">{topicrow.LAST_POST_TIME}</p>
+ <p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
+ <a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
+ </p>
+ </td>
+ <td style="padding: 4px;"> <input type="checkbox" class="radio" name="t[{topicrow.TOPIC_ID}]" /> </td>
+ </tr>
+ <!-- BEGINELSE -->
+ <tr class="row1">
+ <td colspan="4" align="center"><b class="genmed">{L_NO_WATCHED_TOPICS}</b></td>
+ </tr>
+ <!-- END topicrow -->
+<!-- ENDIF -->
<!-- IF .topicrow or .forumrow -->
<tr>
diff --git a/phpBB/ucp.php b/phpBB/ucp.php
index 6812cd59b9..2d47134538 100755
--- a/phpBB/ucp.php
+++ b/phpBB/ucp.php
@@ -292,6 +292,12 @@ if ($module->is_active('zebra', 'friends'))
$db->sql_freeresult($result);
}
+// Do not display subscribed topics/forums if not allowed
+if (!$config['allow_topic_notify'] && !$config['allow_forum_notify'])
+{
+ $module->set_display('main', 'subscribed', false);
+}
+
// Select the active module
$module->set_active($id, $mode);