Searchbox plugin searches fulltext by default - thanks Lubomir :)
This commit is contained in:
parent
bd796129f2
commit
e1b646e87e
@ -1,13 +1,12 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: SearchBox
|
||||
Version: 1.0
|
||||
Plugin URI: http://flatpress.sf.net
|
||||
Description: SearchBox which interfaces with standard search function
|
||||
Author: NoWhereMan
|
||||
Author URI: http://flatpress.sf.net
|
||||
* Plugin Name: SearchBox
|
||||
* Version: 1.0
|
||||
* Plugin URI: http://flatpress.sf.net
|
||||
* Description: SearchBox which interfaces with standard search function
|
||||
* Author: NoWhereMan
|
||||
* Author URI: http://flatpress.sf.net
|
||||
*/
|
||||
|
||||
define('SEARCHBOX_BIG', false);
|
||||
|
||||
function plugin_searchbox_widget() {
|
||||
@ -16,7 +15,8 @@ function plugin_searchbox_widget() {
|
||||
$url = BLOG_BASEURL . 'search.php';
|
||||
|
||||
$content = '<ul><li>
|
||||
<form method="get" action="'.$url.'">';
|
||||
<form method="get" action="' . $url . '">
|
||||
<input type="hidden" name="stype" value="full" />';
|
||||
|
||||
if (SEARCHBOX_BIG)
|
||||
$content .= "<p><a href=\"{$url}\">{$lang['search']['moreopts']}</a></p>";
|
||||
@ -24,21 +24,13 @@ function plugin_searchbox_widget() {
|
||||
$content .= '<p><input type="text" name="q" /></p>';
|
||||
|
||||
if (SEARCHBOX_BIG)
|
||||
$content .=
|
||||
'<p><label><input type="radio"
|
||||
name="stype" value="titles" checked="checked" />'.
|
||||
$lang['search']['onlytitles'] .
|
||||
'</label><br />'.
|
||||
'<label><input type="radio" name="stype" value="full" />'.
|
||||
$lang['search']['fulltext'] .
|
||||
'</label></p>';
|
||||
$content .= '<p><label><input type="radio"
|
||||
name="stype" value="titles" checked="checked" />' . $lang ['search'] ['onlytitles'] . '</label><br />' . '<label><input type="radio" name="stype" value="full" />' . $lang ['search'] ['fulltext'] . '</label></p>';
|
||||
|
||||
$content.= '<p><input name="search" type="submit" value="'.
|
||||
$lang['search']['submit']. '" /> </p>
|
||||
$content .= '<p><input name="search" type="submit" value="' . $lang ['search'] ['submit'] . '" /> </p>
|
||||
</form>
|
||||
</li></ul>';
|
||||
|
||||
|
||||
return array(
|
||||
'subject' => $lang ['search'] ['head'],
|
||||
'content' => $content
|
||||
|
Loading…
x
Reference in New Issue
Block a user