aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/language/en/acp/search.php2
-rw-r--r--phpBB/language/en/memberlist.php2
-rw-r--r--phpBB/language/en/ucp.php1
-rw-r--r--phpBB/memberlist.php1
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php4
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js239
-rw-r--r--phpBB/styles/prosilver/template/memberlist_view.html1
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_profile_info.html2
-rw-r--r--phpBB/styles/prosilver/theme/common.css14
9 files changed, 137 insertions, 129 deletions
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index 564d9dd04c..98412cb050 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -83,7 +83,7 @@ $lang = array_merge($lang, array(
'FULLTEXT_SPHINX_PORT_EXPLAIN' => 'Port on which the sphinx search daemon (searchd) listens. Leave empty to use the default Sphinx API port 9312',
'FULLTEXT_SPHINX_WRONG_DATABASE' => 'The sphinx search for phpBB supports MySQL and PostgreSQL only.',
'FULLTEXT_SPHINX_CONFIG_FILE' => 'Sphinx config file',
- 'FULLTEXT_SPHINX_CONFIG_FILE_EXPLAIN' => 'The generated content of the sphinx config file. This data needs to be pasted into the sphinx.conf which is used by sphinx search daemon.',
+ 'FULLTEXT_SPHINX_CONFIG_FILE_EXPLAIN' => 'The generated content of the sphinx config file. This data needs to be pasted into the sphinx.conf which is used by sphinx search daemon. Replace the [dbuser] and [dbpassword] placeholders with your database credentials.',
'FULLTEXT_SPHINX_NO_CONFIG_DATA' => 'The sphinx data and config directory paths are not defined. Please define them to generate the config file.',
'GENERAL_SEARCH_SETTINGS' => 'General search settings',
diff --git a/phpBB/language/en/memberlist.php b/phpBB/language/en/memberlist.php
index 1a05975892..b8c626d331 100644
--- a/phpBB/language/en/memberlist.php
+++ b/phpBB/language/en/memberlist.php
@@ -54,6 +54,8 @@ $lang = array_merge($lang, array(
'DEST_LANG' => 'Language',
'DEST_LANG_EXPLAIN' => 'Select an appropriate language (if available) for the recipient of this message.',
+ 'EDIT_PROFILE' => 'Edit profile',
+
'EMAIL_BODY_EXPLAIN' => 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your email address.',
'EMAIL_DISABLED' => 'Sorry but all email related functions have been disabled.',
'EMAIL_SENT' => 'The email has been sent.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 101292e171..ad7063d3f9 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -589,6 +589,7 @@ $lang = array_merge($lang, array(
),
'VIEW_PREVIOUS_HISTORY' => 'Previous PM in history',
'VIEW_PREVIOUS_PM' => 'Previous PM',
+ 'VIEW_PROFILE' => 'View profile',
'VIEW_SIGS' => 'Display signatures',
'VIEW_SMILIES' => 'Display smilies as images',
'VIEW_TOPICS_DAYS' => 'Display topics from previous days',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 919036a85c..e3ac8dad51 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -681,6 +681,7 @@ switch ($mode)
'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '',
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_id}&hash=" . generate_link_hash('switchperm')) : '',
+ 'U_EDIT_SELF' => ($user_id == $user->data['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=ucp_profile&mode=profile_info') : '',
'S_USER_NOTES' => ($user_notes_enabled) ? true : false,
'S_WARN_USER' => ($warn_user_enabled) ? true : false,
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index 79d68d2ae1..427464eb3c 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -256,8 +256,8 @@ class fulltext_sphinx
array('type', $this->dbtype . ' # mysql or pgsql'),
// This config value sql_host needs to be changed incase sphinx and sql are on different servers
array('sql_host', $dbhost . ' # SQL server host sphinx connects to'),
- array('sql_user', $dbuser),
- array('sql_pass', $dbpasswd),
+ array('sql_user', '[dbuser]'),
+ array('sql_pass', '[dbpassword]'),
array('sql_db', $dbname),
array('sql_port', $dbport . ' # optional, default is 3306 for mysql and 5432 for pgsql'),
array('sql_query_pre', 'SET NAMES \'utf8\''),
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 1280ceb8ac..aabc5679f6 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -1,5 +1,3 @@
-/* global phpbb */
-
/**
* phpBB3 forum functions
*/
@@ -321,7 +319,8 @@ function parseDocument($container) {
'use strict';
var test = document.createElement('div'),
- oldBrowser = (typeof test.style.borderRadius == 'undefined');
+ oldBrowser = (typeof test.style.borderRadius == 'undefined'),
+ $body = $('body');
/**
* Reset avatar dimensions when changing URL or EMAIL
@@ -348,7 +347,7 @@ function parseDocument($container) {
$container.find('.pagination .dropdown-trigger').click(function() {
var $dropdownContainer = $(this).parent();
// Wait a little bit to make sure the dropdown has activated
- setTimeout(function() {
+ setTimeout(function() {
if ($dropdownContainer.hasClass('dropdown-visible')) {
$dropdownContainer.find('input.inputbox').focus();
}
@@ -356,7 +355,7 @@ function parseDocument($container) {
});
/**
- * Adjust HTML code for IE8 and older versions
+ * Adjust HTML code for IE8 and older versions
*/
if (oldBrowser) {
// Fix .linklist.bulletin lists
@@ -364,7 +363,7 @@ function parseDocument($container) {
}
/**
- * Resize navigation block to keep all links on same line
+ * Resize navigation (breadcrumbs) block to keep all links on same line
*/
$container.find('.navlinks').each(function() {
var $this = $(this),
@@ -394,7 +393,6 @@ function parseDocument($container) {
*/
$container.find('.breadcrumbs:not([data-skip-responsive])').each(function() {
var $this = $(this),
- $body = $('body'),
$links = $this.find('.crumb'),
length = $links.length,
classes = ['wrapped-max', 'wrapped-wide', 'wrapped-medium', 'wrapped-small', 'wrapped-tiny'],
@@ -461,159 +459,173 @@ function parseDocument($container) {
*/
$container.find('.linklist:not(.navlinks, [data-skip-responsive]), .postbody .post-buttons:not([data-skip-responsive])').each(function() {
var $this = $(this),
- $body = $('body'),
filterSkip = '.breadcrumbs, [data-skip-responsive]',
filterLast = '.edit-icon, .quote-icon, [data-last-responsive]',
- persist = $this.attr('id') == 'nav-main',
- $allLinks = $this.children(),
- $links = $allLinks.not(filterSkip),
- html = '<li class="responsive-menu" style="display:none;"><a href="javascript:void(0);" class="responsive-menu-link">&nbsp;</a><div class="dropdown" style="display:none;"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>',
- $filterLastList = $links.filter(filterLast),
- slack = 1; // Vertical slack space (in pixels). Determines how sensitive the script is in determining whether a line-break has occured.
-
- if (!persist) {
- if ($links.is('.rightside')) {
- $links.filter('.rightside:first').before(html);
+ $linksAll = $this.children(),
+ $linksNotSkip = $linksAll.not(filterSkip), // All items that can potentially be hidden
+ $linksFirst = $linksNotSkip.not(filterLast), // The items that will be hidden first
+ $linksLast = $linksNotSkip.filter(filterLast), // The items that will be hidden last
+ persistent = $this.attr('id') == 'nav-main', // Does this list already have a menu (such as quick-links)?
+ html = '<li class="responsive-menu hidden"><a href="javascript:void(0);" class="responsive-menu-link">&nbsp;</a><div class="dropdown hidden"><div class="pointer"><div class="pointer-inner" /></div><ul class="dropdown-contents" /></div></li>',
+ slack = 3; // Vertical slack space (in pixels). Determines how sensitive the script is in determining whether a line-break has occured.
+
+ // Add a hidden drop-down menu to each links list (except those that already have one)
+ if (!persistent) {
+ if ($linksNotSkip.is('.rightside')) {
+ $linksNotSkip.filter('.rightside:first').before(html);
$this.children('.responsive-menu').addClass('rightside');
} else {
$this.append(html);
}
}
- var $item = $this.children('.responsive-menu'),
- $menu = $item.find('.dropdown-contents'),
+ // Set some object references and initial states
+ var $menu = $this.children('.responsive-menu'),
+ $menuContents = $menu.find('.dropdown-contents'),
+ persistentContent = $menuContents.find('li:not(.separator)').length,
lastWidth = false,
compact = false,
- responsive = false,
- copied = false;
+ responsive1 = false,
+ responsive2 = false,
+ copied1 = false,
+ copied2 = false,
+ maxHeight = 0;
+
+ // Find the tallest element in the list (we assume that all elements are roughly the same height)
+ $linksAll.each(function() {
+ if (!$(this).height()) {
+ return;
+ }
+ maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
+ });
+ if (maxHeight < 1) {
+ return; // Shouldn't be possible, but just in case, abort
+ } else {
+ maxHeight = maxHeight + slack;
+ }
function check() {
var width = $body.width();
- if (responsive && width <= lastWidth) {
+ // We can't make it any smaller than this, so just skip
+ if (responsive2 && compact && (width <= lastWidth)) {
return;
}
-
- // Unhide the quick-links menu if it has content
- if (persist) {
- $item.addClass('hidden');
- if ($menu.find('li:not(.separator, .clone)').length || (responsive && $menu.find('li.clone').length)) {
- $item.removeClass('hidden');
- }
- }
+ lastWidth = width;
// Reset responsive and compact layout
- if (responsive) {
- $this.removeClass('responsive');
- $links.css('display', '');
- if (!persist) {
- $item.css('display', 'none');
- }
+ if (responsive1 || responsive2) {
+ $linksNotSkip.removeClass('hidden');
+ $menuContents.children('.clone').addClass('hidden');
+ responsive1 = responsive2 = false;
}
-
if (compact) {
$this.removeClass('compact');
+ compact = false;
}
- // Find tallest element
- var maxHeight = 0;
- $allLinks.each(function() {
- if (!$(this).height()) {
- return;
- }
- maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
- });
-
- if (maxHeight < 1) {
- return;
+ // Unhide the quick-links menu if it has "persistent" content
+ if (persistent && persistentContent) {
+ $menu.removeClass('hidden');
+ } else {
+ $menu.addClass('hidden');
}
// Nothing to resize if block's height is not bigger than tallest element's height
- if ($this.height() <= (maxHeight + slack)) {
+ if ($this.height() <= maxHeight) {
return;
}
- // Enable compact layout, find tallest element, compare to height of whole block
- $this.addClass('compact');
-
- var compactMaxHeight = 0;
- $allLinks.each(function() {
- if (!$(this).height()) {
- return;
- }
- compactMaxHeight = Math.max(compactMaxHeight, $(this).outerHeight(true));
- });
-
- if ($this.height() <= (maxHeight + slack)) {
+ // STEP 1: Compact
+ if (!compact) {
+ $this.addClass('compact');
+ compact = true;
+ }
+ if ($this.height() <= maxHeight) {
return;
}
- // Compact layout did not resize block enough, switch to responsive layout
- $this.removeClass('compact');
- responsive = true;
-
- if (!copied) {
- var clone = $links.clone(true);
- clone.filter('.rightside').each(function() {
- if (persist) {
- $(this).addClass('clone');
- }
- $menu.prepend(this);
- });
-
- 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');
+ // STEP 2: First responsive set - compact
+ if (compact) {
+ $this.removeClass('compact');
+ compact = false;
+ }
+ // Copy the list items to the dropdown
+ if (!copied1) {
+ var $clones1 = $linksFirst.clone();
+ $menuContents.prepend($clones1.addClass('clone clone-first').removeClass('leftside rightside'));
if ($this.hasClass('post-buttons')) {
- $('.button', $menu).removeClass('button icon-button');
- $('.responsive-menu-link', $item).addClass('button icon-button').prepend('<span></span>');
+ $('.button', $menuContents).removeClass('button icon-button');
+ $('.responsive-menu-link', $menu).addClass('button icon-button').prepend('<span></span>');
}
- copied = true;
- } else {
- $menu.children().css('display', '');
+ copied1 = true;
+ }
+ if (!responsive1) {
+ $linksFirst.addClass('hidden');
+ responsive1 = true;
+ $menuContents.children('.clone-first').removeClass('hidden');
+ $menu.removeClass('hidden');
+ }
+ if ($this.height() <= maxHeight) {
+ return;
}
- $item.css('display', '');
- $this.addClass('responsive');
-
- // Try to not hide filtered items
- if ($filterLastList.length) {
- $links.not(filterLast).css('display', 'none');
-
- maxHeight = 0;
- $filterLastList.each(function() {
- if (!$(this).height()) return;
- maxHeight = Math.max(maxHeight, $(this).outerHeight(true));
- });
-
- if ($this.height() <= (maxHeight + slack)) {
- $menu.children().filter(filterLast).css('display', 'none');
- return;
- }
+ // STEP 3: First responsive set + compact
+ if (!compact) {
+ $this.addClass('compact');
+ compact = true;
+ }
+ if ($this.height() <= maxHeight) {
+ return;
}
- // If even responsive isn't enough, use both responsive and compact at same time
- compact = true;
- $this.addClass('compact');
+ // STEP 4: Last responsive set - compact
+ if (!$linksLast.length) {
+ return; // No other links to hide, can't do more
+ }
+ if (compact) {
+ $this.removeClass('compact');
+ compact = false;
+ }
+ // Copy the list items to the dropdown
+ if (!copied2) {
+ var $clones2 = $linksLast.clone();
+ $menuContents.prepend($clones2.addClass('clone clone-last').removeClass('leftside rightside'));
+ copied2 = true;
+ }
+ if (!responsive2) {
+ $linksLast.addClass('hidden');
+ responsive2 = true;
+ $menuContents.children('.clone-last').removeClass('hidden');
+ }
+ if ($this.height() <= maxHeight) {
+ return;
+ }
- $links.css('display', 'none');
+ // STEP 5: Last responsive set + compact
+ if (!compact) {
+ $this.addClass('compact');
+ compact = true;
+ }
}
- if (!persist) {
- phpbb.registerDropdown($item.find('a.responsive-menu-link'), $item.find('.dropdown'));
+ if (!persistent) {
+ phpbb.registerDropdown($menu.find('a.responsive-menu-link'), $menu.find('.dropdown'), false);
}
+ // If there are any images in the links list, run the check again after they have loaded
+ $linksAll.find('img').each(function() {
+ $(this).load(function() {
+ check();
+ });
+ });
+
check();
$(window).resize(check);
});
/**
- * Do not run functions below for old browsers
+ * Do not run functions below for old browsers
*/
if (oldBrowser) {
return;
@@ -747,7 +759,7 @@ function parseDocument($container) {
$this.addClass('show-header');
}
});
-
+
headersLength = headers.length;
// Add header text to each cell as <dfn>
@@ -804,7 +816,6 @@ function parseDocument($container) {
*/
$container.find('#tabs, #minitabs').not('[data-skip-responsive]').each(function() {
var $this = $(this),
- $body = $('body'),
$ul = $this.children(),
$tabs = $ul.children().not('[data-skip-responsive]'),
$links = $tabs.children('a'),
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
index eb151af8df..5d8e6ec8a8 100644
--- a/phpBB/styles/prosilver/template/memberlist_view.html
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -20,6 +20,7 @@
<dt>{L_USERNAME}{L_COLON}</dt>
<dd>
<!-- IF USER_COLOR --><span style="color: {USER_COLOR}; font-weight: bold;"><!-- ELSE --><span><!-- ENDIF -->{USERNAME}</span>
+ <!-- IF U_EDIT_SELF --> [ <a href="{U_EDIT_SELF}">{L_EDIT_PROFILE}</a> ]<!-- ENDIF -->
<!-- IF U_USER_ADMIN --> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]<!-- ENDIF -->
<!-- IF U_USER_BAN --> [ <a href="{U_USER_BAN}">{L_USER_BAN}</a> ]<!-- ENDIF -->
<!-- IF U_SWITCH_PERMISSIONS --> [ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
index 986bc92298..e8e2aedc14 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_profile_info.html
@@ -2,7 +2,7 @@
<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>
-<h2>{L_TITLE}</h2>
+<h2>{L_TITLE} <span class="small">[ <a href="{U_USER_PROFILE}" title="{L_VIEW_PROFILE}">{L_VIEW_PROFILE}</a> ]</span></h2>
<div class="panel">
<div class="inner">
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 090046f54f..adcd04b15e 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -1289,18 +1289,10 @@ ul.linklist:after,
width: 50px;
}
-.dropdown .clone {
+.dropdown .clone.hidden + li.separator {
display: none;
}
-.responsive .dropdown .clone {
- display: inherit;
-}
-
-.dropdown .clone + li.separator {
- display: none;
-}
-
-.responsive .dropdown .clone + li.separator {
- display: inherit;
+.dropdown .clone.hidden + li {
+ border-top: none;
}