From a540cdc3b2efd6fdb10f6c7ce9de43ac04ad2897 Mon Sep 17 00:00:00 2001 From: PayBas Date: Thu, 5 Jun 2014 01:31:19 +0200 Subject: [PATCH] [ticket/12662] Initial setup PHPBB3-12662 --- phpBB/docs/events.md | 28 ++++ phpBB/includes/functions.php | 1 + phpBB/language/en/common.php | 16 +- phpBB/styles/prosilver/template/forum_fn.js | 39 +++-- .../styles/prosilver/template/index_body.html | 18 +-- .../prosilver/template/navbar_footer.html | 18 ++- .../prosilver/template/navbar_header.html | 143 +++++++++++------- .../prosilver/template/viewforum_body.html | 2 +- .../prosilver/template/viewtopic_body.html | 2 +- phpBB/styles/prosilver/theme/bidi.css | 4 +- phpBB/styles/prosilver/theme/colours.css | 24 ++- phpBB/styles/prosilver/theme/common.css | 94 +++++++++--- .../prosilver/theme/images/icon_acp.gif | Bin 0 -> 389 bytes .../prosilver/theme/images/icon_cookies.gif | Bin 0 -> 363 bytes .../prosilver/theme/images/icon_dropdown.png | Bin 0 -> 197 bytes .../prosilver/theme/images/icon_mcp.gif | Bin 0 -> 342 bytes .../prosilver/theme/images/icon_profile.gif | Bin 0 -> 538 bytes .../prosilver/theme/images/icon_team.gif | Bin 0 -> 1009 bytes phpBB/styles/prosilver/theme/links.css | 16 ++ phpBB/styles/prosilver/theme/responsive.css | 2 +- 20 files changed, 293 insertions(+), 114 deletions(-) create mode 100644 phpBB/styles/prosilver/theme/images/icon_acp.gif create mode 100644 phpBB/styles/prosilver/theme/images/icon_cookies.gif create mode 100644 phpBB/styles/prosilver/theme/images/icon_dropdown.png create mode 100644 phpBB/styles/prosilver/theme/images/icon_mcp.gif create mode 100644 phpBB/styles/prosilver/theme/images/icon_profile.gif create mode 100644 phpBB/styles/prosilver/theme/images/icon_team.gif diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 34f2c4b6ec..cc32e7ba26 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -515,6 +515,34 @@ overall_header_page_body_before * Since: 3.1.0-b3 * Purpose: Add content after the page-header, but before the page-body +overall_header_profile_list_after +=== +* Locations: + + styles/prosilver/template/navbar_header.html +* Since: 3.1.0-b5 +* Purpose: Add links to the bottom of the profile drop-down menu in the page-header + +overall_header_profile_list_before +=== +* Locations: + + styles/prosilver/template/navbar_header.html +* Since: 3.1.0-b5 +* Purpose: Add links to the top of the profile drop-down menu in the page-header + +overall_header_quick_links_after +=== +* Locations: + + styles/prosilver/template/navbar_header.html +* Since: 3.1.0-b5 +* Purpose: Add links to the bottom of the quick-links drop-down menu in the header + +overall_header_quick_links_before +=== +* Locations: + + styles/prosilver/template/navbar_header.html +* Since: 3.1.0-b5 +* Purpose: Add links to the top of the quick-links drop-down menu in the header + posting_editor_buttons_after === * Locations: diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 32acb0c9ff..108f6d5d26 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4881,6 +4881,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'PRIVATE_MESSAGE_COUNT' => (!empty($user->data['user_unread_privmsg'])) ? $user->data['user_unread_privmsg'] : 0, 'CURRENT_USER_AVATAR' => phpbb_get_user_avatar($user->data), + 'CURRENT_USERNAME_CLEAN' => get_username_string('no_profile', $user->data['user_id'], $user->data['username'], $user->data['user_colour']), 'CURRENT_USERNAME_FULL' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']), 'UNREAD_NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', 'NOTIFICATIONS_COUNT' => ($notifications !== false) ? $notifications['unread_count'] : '', diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index b9eb0fd11d..4d958b33f0 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -64,7 +64,7 @@ $lang = array_merge($lang, array( 'ACCOUNT_DEACTIVATED' => 'Your account has been manually deactivated and is only able to be reactivated by an administrator.', 'ACCOUNT_NOT_ACTIVATED' => 'Your account has not been activated yet.', 'ACP' => 'Administration Control Panel', - 'ACP_SHORT' => 'Administer', + 'ACP_SHORT' => 'ACP', 'ACTIVE' => 'active', 'ACTIVE_ERROR' => 'The specified username is currently inactive. If you have problems activating your account, please contact a board administrator.', 'ADMINISTRATOR' => 'Administrator', @@ -393,7 +393,7 @@ $lang = array_merge($lang, array( 'MB' => 'MB', 'MIB' => 'MiB', 'MCP' => 'Moderator Control Panel', - 'MCP_SHORT' => 'Moderate', + 'MCP_SHORT' => 'MCP', 'MEMBERLIST' => 'Members', 'MEMBERLIST_EXPLAIN' => 'View complete list of members', 'MERGE' => 'Merge', @@ -594,6 +594,8 @@ $lang = array_merge($lang, array( 'PRIVATE_MESSAGING' => 'Private messaging', 'PROFILE' => 'User Control Panel', + 'QUICK_LINKS' => 'Quick links', + 'RANK' => 'Rank', 'READING_FORUM' => 'Viewing topics in %s', 'READING_GLOBAL_ANNOUNCE' => 'Reading global announcement', @@ -660,15 +662,15 @@ $lang = array_merge($lang, array( 'SEARCH_ADV_EXPLAIN' => 'View the advanced search options', 'SEARCH_KEYWORDS' => 'Search for keywords', 'SEARCHING_FORUMS' => 'Searching forums', - 'SEARCH_ACTIVE_TOPICS' => 'View active topics', + 'SEARCH_ACTIVE_TOPICS' => 'Active topics', 'SEARCH_FOR' => 'Search for', 'SEARCH_FORUM' => 'Search this forum…', - 'SEARCH_NEW' => 'View new posts', + 'SEARCH_NEW' => 'New posts', 'SEARCH_POSTS_BY' => 'Search posts by', - 'SEARCH_SELF' => 'View your posts', + 'SEARCH_SELF' => 'Your posts', 'SEARCH_TOPIC' => 'Search this topic…', - 'SEARCH_UNANSWERED' => 'View unanswered posts', - 'SEARCH_UNREAD' => 'View unread posts', + 'SEARCH_UNANSWERED' => 'Unanswered posts', + 'SEARCH_UNREAD' => 'Unread posts', 'SEARCH_USER_POSTS' => 'Search user’s posts', 'SECONDS' => 'Seconds', 'SEE_ALL' => 'See All', diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js index ea2b815e77..b19149477b 100644 --- a/phpBB/styles/prosilver/template/forum_fn.js +++ b/phpBB/styles/prosilver/template/forum_fn.js @@ -673,19 +673,23 @@ function parse_document(container) var $this = $(this), $body = $('body'), filterSkip = '.breadcrumbs, [data-skip-responsive]', - filterLast = '.pagination, .icon-notifications, .icon-pm, .icon-logout, .icon-login, .mark-read, .edit-icon, .quote-icon', + filterLast = '.pagination, .icon-acp, .icon-mcp, .icon-notifications, .icon-pm, .icon-logout, .icon-login, .mark-read, .edit-icon, .quote-icon', + persist = $this.attr('id') == 'nav-main', allLinks = $this.children(), links = allLinks.not(filterSkip), html = '', filterLastList = links.filter(filterLast); - if (links.is('.rightside')) - { - links.filter('.rightside:first').before(html); - } - else - { - $this.append(html); + if (!persist) { + if (links.is('.rightside')) + { + links.filter('.rightside:first').before(html); + $this.children('.responsive-menu').addClass('rightside'); + } + else + { + $this.append(html); + } } var item = $this.children('.responsive-menu'), @@ -706,7 +710,7 @@ function parse_document(container) responsive = false; $this.removeClass('responsive'); links.css('display', ''); - item.css('display', 'none'); + if (!persist) item.css('display', 'none'); } if (compact) { @@ -752,9 +756,16 @@ function parse_document(container) if (!copied) { var clone = links.clone(true); clone.filter('.rightside').each(function() { + if (persist) this.addClass('clone'); menu.prepend(this); }); - menu.prepend(clone.not('.rightside')); + + if (persist) { + menu.prepend(clone.not('.rightside').addClass('clone')); + } else { + menu.prepend(clone.not('.rightside')); + } + menu.find('li.leftside, li.rightside').removeClass('leftside rightside'); menu.find('.inputbox').parents('li:first').css('white-space', 'normal'); @@ -771,7 +782,7 @@ function parse_document(container) item.css('display', ''); $this.addClass('responsive'); - // Try to not hide filtered items + // Try to not hide filtered items #TODO: this does not work! if (filterLastList.length) { links.not(filterLast).css('display', 'none'); @@ -787,10 +798,14 @@ function parse_document(container) } } + // If even responsive isn't enough, use both responsive and compact at same time + compact = true; + $this.addClass('compact'); + links.css('display', 'none'); } - phpbb.registerDropdown(item.find('a.responsive-menu-link'), item.find('.dropdown')); + if (!persist) phpbb.registerDropdown(item.find('a.responsive-menu-link'), item.find('.dropdown')); check(); $(window).resize(check); diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html index f9c5b4cf20..ce2886111e 100644 --- a/phpBB/styles/prosilver/template/index_body.html +++ b/phpBB/styles/prosilver/template/index_body.html @@ -1,23 +1,13 @@ -

{LAST_VISIT_DATE}{CURRENT_TIME}

-

{CURRENT_TIME}
{L_ACP} | {L_MCP} ]

+

{LAST_VISIT_DATE}{CURRENT_TIME}

+

{CURRENT_TIME}

- + diff --git a/phpBB/styles/prosilver/template/navbar_footer.html b/phpBB/styles/prosilver/template/navbar_footer.html index e2259e8712..2f811d9103 100644 --- a/phpBB/styles/prosilver/template/navbar_footer.html +++ b/phpBB/styles/prosilver/template/navbar_footer.html @@ -10,13 +10,25 @@
  • {S_WATCH_FORUM_TITLE}
  • +
  • {S_TIMEZONE}
  • -
  • {L_DELETE_COOKIES}
  • +
  • {L_DELETE_COOKIES}
  • -
  • {L_THE_TEAM}
  • -
  • {L_CONTACT_US}
  • + + + +
  • {L_THE_TEAM}
  • + + +
  • + {L_MEMBERLIST} +
  • + + +
  • {L_CONTACT_US}
  • + diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index 67a3b553fd..a48d16e466 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -1,68 +1,107 @@