mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 22:57:14 +02:00
Search Administration - admin UI conventions
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* Search Administration
|
* Search Administration
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/search.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/search.php,v $
|
||||||
* $Revision: 1.3 $
|
* $Revision: 1.4 $
|
||||||
* $Date: 2008-12-16 17:23:25 $
|
* $Date: 2008-12-21 11:39:34 $
|
||||||
* $Author: secretr $
|
* $Author: secretr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -25,7 +25,10 @@ $e_sub_cat = 'search';
|
|||||||
require_once('auth.php');
|
require_once('auth.php');
|
||||||
require_once(e_HANDLER.'userclass_class.php');
|
require_once(e_HANDLER.'userclass_class.php');
|
||||||
require_once(e_HANDLER."message_handler.php");
|
require_once(e_HANDLER."message_handler.php");
|
||||||
|
require_once (e_HANDLER.'form_handler.php');
|
||||||
|
$frm = new e_form(true);
|
||||||
$emessage = &eMessage::getInstance();
|
$emessage = &eMessage::getInstance();
|
||||||
|
$e_userclass = new user_class();
|
||||||
|
|
||||||
$query = explode('.', e_QUERY);
|
$query = explode('.', e_QUERY);
|
||||||
|
|
||||||
@@ -71,34 +74,27 @@ if ($save_search)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isset($_POST['update_main']) || isset($_POST['update_main_com']))
|
if (isset($_POST['update_main']))
|
||||||
{ // Update all the basic handler info
|
{ // Update all the basic handler info
|
||||||
|
|
||||||
if(isset($_POST['update_main']))
|
foreach($search_handlers as $s_key => $s_value)
|
||||||
{
|
{
|
||||||
foreach($search_handlers as $s_key => $s_value)
|
$search_prefs['core_handlers'][$s_key]['class'] = $_POST['core_handlers'][$s_key]['class'];
|
||||||
{
|
$search_prefs['core_handlers'][$s_key]['order'] = $_POST['core_handlers'][$s_key]['order'];
|
||||||
$search_prefs['core_handlers'][$s_key]['class'] = $_POST['core_handlers'][$s_key]['class'];
|
|
||||||
$search_prefs['core_handlers'][$s_key]['order'] = $_POST['core_handlers'][$s_key]['order'];
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($search_prefs['plug_handlers'] as $plug_dir => $active)
|
|
||||||
{
|
|
||||||
$search_prefs['plug_handlers'][$plug_dir]['class'] = $_POST['plug_handlers'][$plug_dir]['class'];
|
|
||||||
$search_prefs['plug_handlers'][$plug_dir]['order'] = $_POST['plug_handlers'][$plug_dir]['order'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$search_prefs['google'] = $_POST['google'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST['update_main_com']))
|
foreach ($search_prefs['plug_handlers'] as $plug_dir => $active)
|
||||||
{
|
{
|
||||||
foreach ($search_prefs['comments_handlers'] as $key => $value)
|
$search_prefs['plug_handlers'][$plug_dir]['class'] = $_POST['plug_handlers'][$plug_dir]['class'];
|
||||||
{
|
$search_prefs['plug_handlers'][$plug_dir]['order'] = $_POST['plug_handlers'][$plug_dir]['order'];
|
||||||
$search_prefs['comments_handlers'][$key]['class'] = $_POST['comments_handlers'][$key]['class'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$search_prefs['google'] = $_POST['google'];
|
||||||
|
|
||||||
|
foreach ($search_prefs['comments_handlers'] as $key => $value)
|
||||||
|
{
|
||||||
|
$search_prefs['comments_handlers'][$key]['class'] = $_POST['comments_handlers'][$key]['class'];
|
||||||
|
}
|
||||||
|
|
||||||
$tmp = addslashes(serialize($search_prefs));
|
$tmp = addslashes(serialize($search_prefs));
|
||||||
|
|
||||||
@@ -215,74 +211,65 @@ if ($query[0] == 'settings')
|
|||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_15.": </td>
|
<td class='label'>".SEALAN_15.": </td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
".r_userclass("search_restrict", $pref['search_restrict'], "off", "public,guest,nobody,member,admin,classes")."
|
".$e_userclass->uc_dropdown('search_restrict', $pref['search_restrict'], 'public,guest,nobody,member,admin,classes', "tabindex='".$frm->getNext()."'")."
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_30."</td>
|
<td class='label'>".SEALAN_30."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
<input type='radio' class='radio' id='search-highlight-1' name='search_highlight' value='1'".($pref['search_highlight'] ? " checked='checked'" : "")." /><label for='search-highlight-1'>".SEALAN_16."</label>
|
".$frm->radio_switch('search_highlight', $pref['search_highlight'])."
|
||||||
<input type='radio' class='radio' id='search-highlight-0' name='search_highlight' value='0'".(!$pref['search_highlight'] ? " checked='checked'" : "")." /><label for='search-highlight-0'>".SEALAN_17."</label>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_10."</td>
|
<td class='label'>".SEALAN_10."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
<input type='radio' class='radio' id='relevance-1' name='relevance' value='1'".($search_prefs['relevance'] ? " checked='checked'" : "")." /><label for='relevance-1'>".SEALAN_16."</label>
|
".$frm->radio_switch('relevance', $search_prefs['relevance'])."
|
||||||
<input type='radio' class='radio' id='relevance-0' name='relevance' value='0'".(!$search_prefs['relevance'] ? " checked='checked'" : "")." /><label for='relevance-0'>".SEALAN_17."</label>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_11."</td>
|
<td class='label'>".SEALAN_11."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
<input type='radio' class='radio' id='user-select-1' name='user_select' value='1'".($search_prefs['user_select'] ? " checked='checked'" : "")." /><label for='user-select-1'>".SEALAN_16."</label>
|
".$frm->radio_switch('user_select', $search_prefs['user_select'])."
|
||||||
<input type='radio' class='radio' id='user-select-0' name='user_select' value='0'".(!$search_prefs['user_select'] ? " checked='checked'" : "")." /><label for='user-select-0'>".SEALAN_17."</label>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_19."</td>
|
<td class='label'>".SEALAN_19."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
<input type='radio' class='radio' id='multisearch-1' name='multisearch' value='1'".($search_prefs['multisearch'] ? " checked='checked'" : "")." /><label for='multisearch-1'>".SEALAN_16."</label>
|
".$frm->radio_switch('multisearch', $search_prefs['multisearch'])."
|
||||||
<input type='radio' class='radio' id='multisearch-0' name='multisearch' value='0'".(!$search_prefs['multisearch'] ? " checked='checked'" : "")." /><label for='multisearch-0'>".SEALAN_17."</label>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_35."</td>
|
<td class='label'>".SEALAN_35."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
<input type='radio' class='radio' id='selector-2' name='selector' value='2'".($search_prefs['selector'] == '2' ? " checked='checked'" : "")." /><label for='selector-2'>".SEALAN_36."</label>
|
".$frm->radio_multi('selector', array(2 => SEALAN_36, 1 => SEALAN_37, 0 => SEALAN_38), $search_prefs['selector'])."
|
||||||
<input type='radio' class='radio' id='selector-1' name='selector' value='1'".($search_prefs['selector'] == '1' ? " checked='checked'" : "")." /><label for='selector-1'>".SEALAN_37."</label>
|
|
||||||
<input type='radio' class='radio' id='selector-0' name='selector' value='0'".($search_prefs['selector'] == '0' ? " checked='checked'" : "")." /><label for='selector-0'>".SEALAN_38."</label>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_12."</td>
|
<td class='label'>".SEALAN_12."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
<input type='radio' class='radio' id='time_restrict-0' name='time_restrict' value='0'".(!$search_prefs['time_restrict'] ? " checked='checked'" : "")." /><label for='selector-0'>".SEALAN_17."</label>
|
".$frm->radio_multi('time_restrict', array(0 => LAN_DISABLED, 1 => SEALAN_13), $search_prefs['time_restrict'])."
|
||||||
<input type='radio' class='radio' id='time_restrict-1' name='time_restrict' value='1'".($search_prefs['time_restrict'] ? " checked='checked'" : "")." /><label for='selector-1'>".SEALAN_13."</label>
|
".$frm->text('time_secs', $tp -> toForm($search_prefs['time_secs']), 3, 'class=tbox&size=5')." ".SEALAN_14."
|
||||||
<input class='tbox' type='text' name='time_secs' value='".$tp -> toForm($search_prefs['time_secs'])."' size='3' maxlength='3' /> ".SEALAN_14."
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_3."</td>
|
<td class='label'>".SEALAN_3."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
".$rs -> form_radio('search_sort', 'mysql', ($search_prefs['mysql_sort'] == TRUE ? 1 : 0))." MySql<br />
|
".$frm->radio_switch('search_sort', $search_prefs['mysql_sort'], 'MySql', SEALAN_31)."
|
||||||
".$rs -> form_radio('search_sort', 'php', ($search_prefs['mysql_sort'] == TRUE ? 0 : 1))." ".SEALAN_31."
|
".$frm->text('php_limit', $tp -> toForm($search_prefs['php_limit']), 5, 'class=tbox&size=5')." ".SEALAN_32."
|
||||||
<input class='tbox' type='text' name='php_limit' value='".$tp -> toForm($search_prefs['php_limit'])."' size='5' maxlength='5' /> ".SEALAN_32."
|
|
||||||
<div class='field-help'>".SEALAN_49."</div>
|
<div class='field-help'>".SEALAN_49."</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>".SEALAN_47."</td>
|
<td class='label'>".SEALAN_47."</td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
<input type='radio' class='radio' id='boundary-1' name='boundary' value='1'".($search_prefs['boundary'] ? " checked='checked'" : "")." /><label for='boundary-1'>".SEALAN_16."</label>
|
".$frm->radio_switch('boundary', $search_prefs['boundary'])."
|
||||||
<input type='radio' class='radio' id='boundary-0' name='boundary' value='0'".(!$search_prefs['boundary'] ? " checked='checked'" : "")." /><label for='boundary-0'>".SEALAN_17."</label>
|
|
||||||
<div class='field-help'>".SEALAN_48."</div>
|
<div class='field-help'>".SEALAN_48."</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class='buttons-bar center'>
|
<div class='buttons-bar center'>
|
||||||
<button class='update' type='submit' name='update_prefs' value='".LAN_UPDATE."'><span>".LAN_UPDATE."</span></button>
|
".$frm->admin_button('update_prefs', LAN_UPDATE, 'update')."
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
@@ -446,9 +433,6 @@ else
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class='buttons-bar center'>
|
|
||||||
<button class='update' type='submit' name='update_main' value='".LAN_UPDATE."'><span>".LAN_UPDATE."</span></button>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
";
|
";
|
||||||
@@ -490,7 +474,7 @@ else
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class='buttons-bar center'>
|
<div class='buttons-bar center'>
|
||||||
<button class='update' type='submit' name='update_main_com' value='".LAN_UPDATE."'><span>".LAN_UPDATE."</span></button>
|
<button class='update' type='submit' name='update_main' value='".LAN_UPDATE."'><span>".LAN_UPDATE."</span></button>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
@@ -516,7 +500,7 @@ function search_adminmenu() {
|
|||||||
$var['settings']['text'] = SEALAN_42;
|
$var['settings']['text'] = SEALAN_42;
|
||||||
$var['settings']['link'] = e_SELF."?settings";
|
$var['settings']['link'] = e_SELF."?settings";
|
||||||
|
|
||||||
show_admin_menu(SEALAN_40, $action, $var);
|
e_admin_menu(SEALAN_40, $action, $var);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -1,27 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| e107 website system
|
* $Id: search.php,v 1.2 2008-12-21 11:39:34 secretr Exp $
|
||||||
|
|
*
|
||||||
| <20>Steve Dunstan 2001-2002
|
* Search Admin Help
|
||||||
| http://e107.org
|
*
|
||||||
| jalist@e107.org
|
|
||||||
|
|
|
||||||
| Released under the terms and conditions of the
|
|
||||||
| GNU General Public License (http://gnu.org).
|
|
||||||
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/help/search.php,v $
|
|
||||||
| $Revision: 1.1.1.1 $
|
|
||||||
| $Date: 2006-12-02 04:34:43 $
|
|
||||||
| $Author: mcfly_e107 $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
$text = "If your MySQL server version supports it you can switch
|
$caption = "Search Help";
|
||||||
to the MySQL sort method which is faster than the PHP sort method. See preferences.<br /><br />
|
$text = "
|
||||||
If your site includes Ideographic languages such as Chinese and Japanese you must
|
<p>
|
||||||
use the PHP sort method and switch whole word matching off.";
|
If your MySQL server version supports it you can switch
|
||||||
$ns -> tablerender("Search Help", $text);
|
to the MySQL sort method which is faster than the PHP sort method. See preferences.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
If your site includes Ideographic languages such as Chinese and Japanese you must
|
||||||
|
use the PHP sort method and switch whole word matching off.
|
||||||
|
</p>
|
||||||
|
";
|
||||||
|
$ns->tablerender($caption, $text);
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user