aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-10-16 10:50:17 -0700
committerNathan Guse <nathaniel.guse@gmail.com>2013-10-16 10:50:17 -0700
commit852b707b48cef513318d52db1d2a5f40621636d6 (patch)
tree1a270527f3e0e12f9d1eae5e7cfffdf33d2182d6
parentecc756e12e8f2a65fbe7d636dac7cc330fa4719f (diff)
parentab8ac5e284e6d260ed0731677a30270b034fc1a4 (diff)
downloadforums-852b707b48cef513318d52db1d2a5f40621636d6.tar
forums-852b707b48cef513318d52db1d2a5f40621636d6.tar.gz
forums-852b707b48cef513318d52db1d2a5f40621636d6.tar.bz2
forums-852b707b48cef513318d52db1d2a5f40621636d6.tar.xz
forums-852b707b48cef513318d52db1d2a5f40621636d6.zip
Merge pull request #1781 from VSEphpbb/ticket/11921
Ticket/11921 - Streamline PMs and Notifications in Header Link List
-rw-r--r--phpBB/includes/functions.php18
-rw-r--r--phpBB/includes/ucp/ucp_notifications.php2
-rw-r--r--phpBB/language/en/common.php13
-rw-r--r--phpBB/styles/prosilver/template/overall_header.html8
-rw-r--r--phpBB/styles/prosilver/template/ucp_notifications.html4
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css2
-rw-r--r--phpBB/styles/prosilver/theme/buttons.css4
-rw-r--r--phpBB/styles/prosilver/theme/colours.css2
-rw-r--r--phpBB/styles/prosilver/theme/common.css14
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_notification.gifbin0 -> 614 bytes
-rw-r--r--phpBB/styles/prosilver/theme/images/icon_pm.gifbin0 -> 576 bytes
-rw-r--r--phpBB/styles/subsilver2/template/overall_header.html10
-rw-r--r--phpBB/styles/subsilver2/template/ucp_notifications.html2
-rw-r--r--phpBB/styles/subsilver2/theme/images/icon_mini_notification.gifbin0 -> 321 bytes
14 files changed, 23 insertions, 56 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 947e29ea02..ad5e3c05ce 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -5225,16 +5225,13 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
$l_online_time = $user->lang('VIEW_ONLINE_TIMES', (int) $config['load_online_time']);
}
- $l_privmsgs_text = $l_privmsgs_text_unread = '';
$s_privmsg_new = false;
- // Obtain number of new private messages if user is logged in
+ // Check for new private messages if user is logged in
if (!empty($user->data['is_registered']))
{
if ($user->data['user_new_privmsg'])
{
- $l_privmsgs_text = $user->lang('NEW_PMS', (int) $user->data['user_new_privmsg']);
-
if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit'])
{
$sql = 'UPDATE ' . USERS_TABLE . '
@@ -5251,16 +5248,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
}
else
{
- $l_privmsgs_text = $user->lang('NEW_PMS', 0);
$s_privmsg_new = false;
}
-
- $l_privmsgs_text_unread = '';
-
- if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg'])
- {
- $l_privmsgs_text_unread = $user->lang('UNREAD_PMS', (int) $user->data['user_unread_privmsg']);
- }
}
$forum_id = request_var('f', 0);
@@ -5350,12 +5339,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'TOTAL_USERS_ONLINE' => $l_online_users,
'LOGGED_IN_USER_LIST' => $online_userlist,
'RECORD_USERS' => $l_online_record,
- 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
- 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
+ 'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg'])) ? $user->data['user_unread_privmsg'] : 0,
'HIDDEN_FIELDS_FOR_JUMPBOX' => $hidden_fields_for_jumpbox,
'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '',
- 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $user->lang('NOTIFICATIONS_COUNT', $notifications['unread_count']) : '',
+ 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '',
'U_VIEW_ALL_NOTIFICATIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications'),
'U_NOTIFICATION_SETTINGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_notifications&amp;mode=notification_options'),
'S_NOTIFICATIONS_DISPLAY' => $config['load_notifications'],
diff --git a/phpBB/includes/ucp/ucp_notifications.php b/phpBB/includes/ucp/ucp_notifications.php
index 2f22f6cf9c..145963837c 100644
--- a/phpBB/includes/ucp/ucp_notifications.php
+++ b/phpBB/includes/ucp/ucp_notifications.php
@@ -140,7 +140,7 @@ class ucp_notifications
$template->assign_vars(array(
'PAGE_NUMBER' => phpbb_on_page($template, $user, $base_url, $notifications['total_count'], $config['topics_per_page'], $start),
- 'TOTAL_COUNT' => $user->lang('NOTIFICATIONS_COUNT', $notifications['total_count']),
+ 'TOTAL_COUNT' => $notifications['total_count'],
'U_MARK_ALL' => $base_url . '&amp;mark=all&amp;token=' . generate_link_hash('mark_all_notifications_read'),
));
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index e5c0478d98..bb1c4698ec 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -401,10 +401,6 @@ $lang = array_merge($lang, array(
'NEWEST_USER' => 'Our newest member <strong>%s</strong>',
'NEW_MESSAGE' => 'New message',
'NEW_MESSAGES' => 'New messages',
- 'NEW_PMS' => array(
- 1 => '<strong>%d</strong> new message',
- 2 => '<strong>%d</strong> new messages',
- ),
'NEW_POST' => 'New post', // Not used anymore
'NEW_POSTS' => 'New posts', // Not used anymore
'NEXT' => 'Next', // Used in pagination
@@ -417,11 +413,6 @@ $lang = array_merge($lang, array(
'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.',
'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
'NOTIFICATIONS' => 'Notifications',
- 'NOTIFICATIONS_COUNT' => array(
- 0 => '%d Notifications',
- 1 => '<strong>%d</strong> Notification',
- 2 => '<strong>%d</strong> Notifications',
- ),
'NOTIFICATION_BOOKMARK' => '%1$s replied to the topic "%2$s" you have bookmarked.',
'NOTIFICATION_GROUP_REQUEST' => '%1$s is requesting to join the group %2$s.',
'NOTIFICATION_GROUP_REQUEST_APPROVED' => 'Your request to join the group %1$s has been approved.',
@@ -757,10 +748,6 @@ $lang = array_merge($lang, array(
'UNKNOWN_BROWSER' => 'Unknown browser',
'UNMARK_ALL' => 'Unmark all',
'UNREAD_MESSAGES' => 'Unread messages',
- 'UNREAD_PMS' => array(
- 1 => '<strong>%d</strong> unread message',
- 2 => '<strong>%d</strong> unread messages',
- ),
'UNREAD_POST' => 'Unread post',
'UNREAD_POSTS' => 'Unread posts',
'UNWATCH_FORUM_CONFIRM' => 'Are you sure you wish to unsubscribe from this forum?',
diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html
index 92baf6ee51..f2f47332d7 100644
--- a/phpBB/styles/prosilver/template/overall_header.html
+++ b/phpBB/styles/prosilver/template/overall_header.html
@@ -98,7 +98,7 @@
<ul class="linklist leftside bulletin">
<!-- IF S_NOTIFICATIONS_DISPLAY -->
<li class="icon-notification">
- <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button">{NOTIFICATIONS_COUNT}</a>
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button">{L_NOTIFICATIONS} [<strong>{NOTIFICATIONS_COUNT}</strong>]</a>
<div id="notification_list" class="notification_list">
<div class="pointer"><div class="pointer_inner"></div></div>
<div class="header">
@@ -135,9 +135,13 @@
</div>
</li>
<!-- ENDIF -->
+ <!-- IF S_DISPLAY_PM -->
+ <li class="icon-pm">
+ <a href="{U_PRIVATEMSGS}">{L_PRIVATE_MESSAGES} [<strong>{PRIVATE_MESSAGE_COUNT}</strong>]</a>
+ </li>
+ <!-- ENDIF -->
<li class="icon-ucp">
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
- <!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>)<!-- ENDIF -->
</li>
<!-- IF S_DISPLAY_SEARCH -->
<li class="icon-search-self"><a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></li>
diff --git a/phpBB/styles/prosilver/template/ucp_notifications.html b/phpBB/styles/prosilver/template/ucp_notifications.html
index 2088de49e8..f71b7aaf56 100644
--- a/phpBB/styles/prosilver/template/ucp_notifications.html
+++ b/phpBB/styles/prosilver/template/ucp_notifications.html
@@ -44,7 +44,7 @@
<div class="topic-actions">
<div class="pagination">
<!-- IF U_MARK_ALL --><a href="{U_MARK_ALL}">{L_NOTIFICATIONS_MARK_ALL_READ}</a> &bull; <!-- ENDIF -->
- <!-- IF TOTAL_COUNT -->{TOTAL_COUNT} &bull; <!-- ENDIF -->
+ <!-- IF TOTAL_COUNT -->{L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>] &bull; <!-- ENDIF -->
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
@@ -93,7 +93,7 @@
<!-- IF .pagination or TOTAL_COUNT -->
<div class="topic-actions">
<div class="pagination">
- <!-- IF TOTAL_COUNT -->{TOTAL_COUNT} &bull; <!-- ENDIF -->
+ <!-- IF TOTAL_COUNT -->{L_NOTIFICATIONS} [<strong>{TOTAL_COUNT}</strong>] &bull; <!-- ENDIF -->
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index 41a9874a18..c06ad4eb1c 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -535,7 +535,7 @@
/* Icon images
---------------------------------------- */
.rtl .sitehome, .rtl .icon-faq, .rtl .icon-members, .rtl .icon-home, .rtl .icon-ucp, .rtl .icon-register, .rtl .icon-logout,
-.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search {
+.rtl .icon-bookmark, .rtl .icon-bump, .rtl .icon-subscribe, .rtl .icon-unsubscribe, .rtl .icon-pages, .rtl .icon-search, .rtl .icon-notification, .rtl .icon-pm {
background-position: 100% 50%;
padding: 1px 17px 0 0;
}
diff --git a/phpBB/styles/prosilver/theme/buttons.css b/phpBB/styles/prosilver/theme/buttons.css
index 3860869501..b05883b465 100644
--- a/phpBB/styles/prosilver/theme/buttons.css
+++ b/phpBB/styles/prosilver/theme/buttons.css
@@ -91,14 +91,14 @@ a.sendemail {
/* Icon images
---------------------------------------- */
.sitehome, .icon-faq, .icon-members, .icon-home, .icon-ucp, .icon-register, .icon-logout,
-.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search {
+.icon-bookmark, .icon-bump, .icon-subscribe, .icon-unsubscribe, .icon-pages, .icon-search, .icon-notification, .icon-pm {
background-position: 0 50%;
background-repeat: no-repeat;
background-image: none;
padding: 1px 0 0 17px;
}
-ul.linklist.bulletin li.icon-home:before, ul.linklist.bulletin li.icon-ucp:before,
+ul.linklist.bulletin li.icon-home:before, ul.linklist.bulletin li.icon-ucp:before, ul.linklist.bulletin li.icon-notification:before, ul.linklist.bulletin li.icon-pm:before,
ul.linklist.bulletin li.icon-bookmark:before, ul.linklist.bulletin li.icon-bump:before, ul.linklist.bulletin li.icon-subscribe:before, ul.linklist.bulletin li.icon-unsubscribe:before {
display: none;
}
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 08123fd9e8..3f837976bf 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -707,6 +707,8 @@ a.sendemail {
.icon-unsubscribe { background-image: url("./images/icon_unsubscribe.gif"); }
.icon-pages { background-image: url("./images/icon_pages.gif"); }
.icon-search { background-image: url("./images/icon_search.gif"); }
+.icon-notification { background-image: url("./images/icon_notification.gif"); }
+.icon-pm { background-image: url("./images/icon_pm.gif"); }
/* Profile & navigation icons */
.email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); }
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 9021c157a3..4dbcc6f455 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -378,20 +378,6 @@ ul.linklist.bulletin li.no-bulletin:before {
display: none;
}
-.icon-notification:before, ul.linklist.bulletin li.icon-notification:before, .icon-notification:after {
- display: inline;
- font: inherit;
-}
-
-.icon-notification:before, ul.linklist.bulletin li.icon-notification:before {
- content: '[';
- padding-right: 0;
-}
-
-.icon-notification:after {
- content: ']';
-}
-
/* Table styles
----------------------------------------*/
table.table1 {
diff --git a/phpBB/styles/prosilver/theme/images/icon_notification.gif b/phpBB/styles/prosilver/theme/images/icon_notification.gif
new file mode 100644
index 0000000000..0eca47843d
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_notification.gif
Binary files differ
diff --git a/phpBB/styles/prosilver/theme/images/icon_pm.gif b/phpBB/styles/prosilver/theme/images/icon_pm.gif
new file mode 100644
index 0000000000..6d308f37c2
--- /dev/null
+++ b/phpBB/styles/prosilver/theme/images/icon_pm.gif
Binary files differ
diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html
index 7bfb85017a..52c0c3ff90 100644
--- a/phpBB/styles/subsilver2/template/overall_header.html
+++ b/phpBB/styles/subsilver2/template/overall_header.html
@@ -152,7 +152,7 @@ function marklist(id, name, state)
<tr>
<td class="genmed">
<!-- IF S_NOTIFICATIONS_DISPLAY and not S_IS_BOT and S_USER_LOGGED_IN -->
- [ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button">{NOTIFICATIONS_COUNT}</a> ]&nbsp;
+ <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button"><img src="{T_THEME_PATH}/images/icon_mini_notification.gif" width="12" height="13" alt="*" /> {L_NOTIFICATIONS} [<strong>{NOTIFICATIONS_COUNT}</strong>]</a>&nbsp;
<div id="notification_list" class="notification_list">
<div class="row1 header">
{L_NOTIFICATIONS}
@@ -191,15 +191,15 @@ function marklist(id, name, state)
</div>
</div>
<!-- ENDIF -->
- <!-- IF not S_IS_BOT --><a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp;<!-- ENDIF -->
- <!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
- <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span class="error">{L_BOARD_DISABLED}</span><!-- ENDIF -->
<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->
- <!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a><!-- ENDIF -->
+ <!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/icon_mini_message.gif" width="12" height="13" alt="*" /> {L_PRIVATE_MESSAGES} [<strong>{PRIVATE_MESSAGE_COUNT}</strong>]</a><!-- ENDIF -->
<!-- ELSEIF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --> &nbsp;<a href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/icon_mini_register.gif" width="12" height="13" alt="*" /> {L_REGISTER}</a>
<!-- ENDIF -->
<!-- ENDIF -->
+ <!-- IF not S_IS_BOT --> &nbsp;<a href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_LOGIN_LOGOUT}</a>&nbsp;<!-- ENDIF -->
+ <!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}"><img src="{T_THEME_PATH}/images/icon_mini_login.gif" width="12" height="13" alt="*" /> {L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
+ <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span class="error">{L_BOARD_DISABLED}</span><!-- ENDIF -->
</td>
<td class="genmed" align="{S_CONTENT_FLOW_END}">
<a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>
diff --git a/phpBB/styles/subsilver2/template/ucp_notifications.html b/phpBB/styles/subsilver2/template/ucp_notifications.html
index 4a1630786a..c8f72d20c2 100644
--- a/phpBB/styles/subsilver2/template/ucp_notifications.html
+++ b/phpBB/styles/subsilver2/template/ucp_notifications.html
@@ -57,7 +57,7 @@
<table width="100%" cellspacing="1">
<tr>
<td class="nav" valign="middle" nowrap="nowrap">&nbsp;{PAGE_NUMBER}</td>
- <td class="gensmall" nowrap="nowrap" width="100%">&nbsp;[ <b>{TOTAL_COUNT}</b> ]&nbsp;</td>
+ <td class="gensmall" nowrap="nowrap" width="100%">&nbsp;{L_NOTIFICATIONS} [ <b>{TOTAL_COUNT}</b> ]&nbsp;</td>
</tr>
</table>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif b/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif
new file mode 100644
index 0000000000..8ff818325a
--- /dev/null
+++ b/phpBB/styles/subsilver2/theme/images/icon_mini_notification.gif
Binary files differ