mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/10737] Add config setting to disable live searches.
PHPBB3-10737
This commit is contained in:
parent
683e8c0c17
commit
607698c884
6 changed files with 33 additions and 3 deletions
|
@ -345,6 +345,7 @@ class acp_board
|
||||||
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
|
'allow_live_searches' => array('lang' => 'ALLOW_LIVE_SEARCHES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
|
|
||||||
'legend3' => 'CUSTOM_PROFILE_FIELDS',
|
'legend3' => 'CUSTOM_PROFILE_FIELDS',
|
||||||
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
|
|
|
@ -21,6 +21,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_cdn', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_emailreuse', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_forum_notify', '1');
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_live_searches', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_mass_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', 'USERNAME_CHARS_ANY');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_name_chars', 'USERNAME_CHARS_ANY');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange', '0');
|
||||||
|
|
|
@ -356,6 +356,8 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'ALLOW_CDN' => 'Allow usage of third party content delivery networks',
|
'ALLOW_CDN' => 'Allow usage of third party content delivery networks',
|
||||||
'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Google’s content delivery network.',
|
'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Google’s content delivery network.',
|
||||||
|
'ALLOW_LIVE_SEARCHES' => 'Allow live searches',
|
||||||
|
'ALLOW_LIVE_SEARCHES_EXPLAIN' => 'If this setting is enabled, users are provided with keyword suggestions as they type in certain fields throughout the board.',
|
||||||
'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
|
'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
|
||||||
'LIMIT_LOAD' => 'Limit system load',
|
'LIMIT_LOAD' => 'Limit system load',
|
||||||
'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.',
|
'LIMIT_LOAD_EXPLAIN' => 'If the system’s 1-minute load average exceeds this value the board will automatically go offline. A value of 1.0 equals ~100% utilisation of one processor. This only functions on UNIX based servers and where this information is accessible. The value here resets itself to 0 if phpBB was unable to get the load limit.',
|
||||||
|
|
|
@ -1647,7 +1647,7 @@ switch ($mode)
|
||||||
|
|
||||||
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&start=$start" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '',
|
'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser' . (($start) ? "&start=$start" : '') . (!empty($params) ? '&' . implode('&', $params) : '')) : '',
|
||||||
'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '',
|
'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser' || ($mode == '' && $submit)) ? $u_hide_find_member : '',
|
||||||
'U_LIVE_SEARCH' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=livesearch'),
|
'U_LIVE_SEARCH' => ($config['allow_live_searches']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=livesearch') : false,
|
||||||
'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
|
'U_SORT_USERNAME' => $sort_url . '&sk=a&sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||||
'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
|
'U_SORT_JOINED' => $sort_url . '&sk=c&sd=' . (($sort_key == 'c' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||||
'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
|
'U_SORT_POSTS' => $sort_url . '&sk=d&sd=' . (($sort_key == 'd' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||||
|
|
25
phpBB/phpbb/db/migration/data/v310/live_searches_config.php
Normal file
25
phpBB/phpbb/db/migration/data/v310/live_searches_config.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package migration
|
||||||
|
* @copyright (c) 2014 phpBB Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\db\migration\data\v310;
|
||||||
|
|
||||||
|
class live_searches_config extends \phpbb\db\migration\migration
|
||||||
|
{
|
||||||
|
public function effectively_installed()
|
||||||
|
{
|
||||||
|
return isset($this->config['allow_live_searches']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_data()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
array('config.add', array('allow_live_searches', '1')),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,8 +10,8 @@
|
||||||
<dl style="overflow: visible;">
|
<dl style="overflow: visible;">
|
||||||
<dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
|
<dt><label for="username">{L_USERNAME}{L_COLON}</label></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<input type="text" name="username" id="username" value="{USERNAME}" class="inputbox" autocomplete="off" data-filter="phpbb.search.filter" data-ajax="member_search" data-min-length="3" data-url="{U_LIVE_SEARCH}" data-results="#user-search" />
|
<input type="text" name="username" id="username" value="{USERNAME}" class="inputbox"<!-- IF U_LIVE_SEARCH --> autocomplete="off" data-filter="phpbb.search.filter" data-ajax="member_search" data-min-length="3" data-url="{U_LIVE_SEARCH}" data-results="#user-search"<!-- ENDIF --> />
|
||||||
|
<!-- IF U_LIVE_SEARCH -->
|
||||||
<div class="dropdown-container">
|
<div class="dropdown-container">
|
||||||
<div class="dropdown live-search hidden" id="user-search">
|
<div class="dropdown live-search hidden" id="user-search">
|
||||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||||
|
@ -20,6 +20,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- ENDIF -->
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- IF S_EMAIL_SEARCH_ALLOWED -->
|
<!-- IF S_EMAIL_SEARCH_ALLOWED -->
|
||||||
|
|
Loading…
Add table
Reference in a new issue