mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 01:54:12 +02:00
new module creation
This commit is contained in:
BIN
e107_plugins/search_menu/images/search.png
Normal file
BIN
e107_plugins/search_menu/images/search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 912 B |
BIN
e107_plugins/search_menu/images/search_32.png
Normal file
BIN
e107_plugins/search_menu/images/search_32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
14
e107_plugins/search_menu/languages/English.php
Normal file
14
e107_plugins/search_menu/languages/English.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/search_menu/languages/English.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:43 $
|
||||
| $Author: mcfly_e107 $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
define("LAN_180", "Search");
|
||||
|
||||
?>
|
78
e107_plugins/search_menu/search_menu.php
Normal file
78
e107_plugins/search_menu/search_menu.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| 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_plugins/search_menu/search_menu.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:35:43 $
|
||||
| $Author: mcfly_e107 $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
@include(e_PLUGIN."search_menu/languages/".e_LANGUAGE.".php");
|
||||
if (strstr(e_PAGE, "news.php")) {
|
||||
$page = 0;
|
||||
} elseif(strstr(e_PAGE, "comment.php")) {
|
||||
$page = 1;
|
||||
} elseif(strstr(e_PAGE, "content.php") && strstr(e_QUERY, "content")) {
|
||||
$page = 2;
|
||||
} elseif(strstr(e_PAGE, "content.php") && strstr(e_QUERY, "review")) {
|
||||
$page = 3;
|
||||
} elseif(strstr(e_PAGE, "content.php") && strstr(e_QUERY, "content")) {
|
||||
$page = 4;
|
||||
} elseif(strstr(e_PAGE, "chat.php")) {
|
||||
$page = 5;
|
||||
} elseif(strstr(e_PAGE, "links.php")) {
|
||||
$page = 6;
|
||||
} elseif(strstr(e_PAGE, "forum")) {
|
||||
$page = 7;
|
||||
} elseif(strstr(e_PAGE, "user.php") || strstr(e_PAGE, "usersettings.php")) {
|
||||
$page = 8;
|
||||
} elseif(strstr(e_PAGE, "download.php")) {
|
||||
$page = 9;
|
||||
} else {
|
||||
$page = 99;
|
||||
}
|
||||
|
||||
if (isset($custom_query[1]) && $custom_query[1] != '') {
|
||||
$image_file = ($custom_query[1] != 'default') ? $custom_query[1] : e_PLUGIN_ABS.'search_menu/images/search.png';
|
||||
$width = (isset($custom_query[2]) && $custom_query[2]) ? $custom_query[2] : '16';
|
||||
$height = (isset($custom_query[3]) && $custom_query[3]) ? $custom_query[3] : '16';
|
||||
$search_button = "<input type='image' src='".$image_file."' value='".LAN_180."' style='width: ".$width."px; height: ".$height."px; border: 0px; vertical-align: middle' name='s' />";
|
||||
} else {
|
||||
$search_button = "<input class='button search' type='submit' name='s' value='".LAN_180."' />";
|
||||
}
|
||||
|
||||
if (isset($custom_query[5]) && $custom_query[5]) {
|
||||
$value_text = "value='".$custom_query[5]."' onclick=\"this.value=''\"";
|
||||
} else {
|
||||
$value_text = "value=''";
|
||||
}
|
||||
|
||||
$text = "<form method='get' action='".e_HTTP."search.php'>
|
||||
<div>
|
||||
<input class='tbox search' type='text' name='q' size='20' ".$value_text." maxlength='50' />
|
||||
<input type='hidden' name='r' value='0' />";
|
||||
|
||||
if (isset($custom_query[4]) && $custom_query[4] != '') {
|
||||
$text .= "<input type='hidden' name='ref' value='".$custom_query[4]."' />";
|
||||
}
|
||||
|
||||
$text .= $search_button."
|
||||
</div>
|
||||
</form>";
|
||||
if (isset($searchflat) && $searchflat) {
|
||||
echo $text;
|
||||
} else {
|
||||
$ns->tablerender(LAN_180." ".SITENAME, "<div style='text-align:center'>".$text."</div>", 'search');
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user