* Added new 'fulltext' search option to sidebar plugin
http://board.s9y.org/viewtopic.php?f=4&t=16051
This commit is contained in:
parent
510469b664
commit
96ab3904fd
@ -3,6 +3,9 @@
|
||||
Version 1.6 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Added new 'fulltext' search option to sidebar plugin
|
||||
http://board.s9y.org/viewtopic.php?f=4&t=16051
|
||||
|
||||
* Fix SQL query statement for deleting a category, which on some
|
||||
DB types (SQlite) might not return "true" and thus not really
|
||||
delete the category. (garvinhicking)
|
||||
|
@ -98,7 +98,8 @@ if ($serendipity['smarty_raw_mode']) {
|
||||
$serendipity['smarty']->assign(
|
||||
array(
|
||||
'content_message' => sprintf(YOUR_SEARCH_RETURNED_BLAHBLAH, '<span class="searchterm">' . $serendipity['GET']['searchTerm'] . '</span>', '<span class="searchresults">' . serendipity_getTotalEntries() . '</span>'),
|
||||
'searchresult_results' => true
|
||||
'searchresult_results' => true,
|
||||
'searchresult_fullentry' => $serendipity['GET']['fullentry']
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -368,19 +368,37 @@ class serendipity_quicksearch_plugin extends serendipity_plugin {
|
||||
$propbag->add('description', SEARCH_FOR_ENTRY);
|
||||
$propbag->add('stackable', false);
|
||||
$propbag->add('author', 'Serendipity Team');
|
||||
$propbag->add('version', '1.0');
|
||||
$propbag->add('version', '1.1');
|
||||
$propbag->add('configuration', array('fullentry'));
|
||||
$propbag->add('groups', array('FRONTEND_ENTRY_RELATED'));
|
||||
}
|
||||
|
||||
function introspect_config_item($name, &$propbag)
|
||||
{
|
||||
switch($name) {
|
||||
case 'fullentry':
|
||||
$propbag->add('type', 'boolean');
|
||||
$propbag->add('name', SEARCH_FULLENTRY);
|
||||
$propbag->add('description', '');
|
||||
$propbag->add('default', true);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function generate_content(&$title)
|
||||
{
|
||||
global $serendipity;
|
||||
|
||||
$title = $this->title;
|
||||
$fullentry = serendipity_db_bool($this->get_config('fullentry', true));
|
||||
?>
|
||||
<form id="searchform" action="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['indexFile']; ?>" method="get">
|
||||
<div>
|
||||
<input type="hidden" name="serendipity[action]" value="search" />
|
||||
<input type="hidden" name="serendipity[fullentry]" value="<?php echo $fullentry ?>" />
|
||||
<input alt="<?php echo QUICKSEARCH; ?>" type="text" id="serendipityQuickSearchTermField" name="serendipity[searchTerm]" size="13" />
|
||||
<input class="quicksearch_submit" type="submit" value=">" alt="<?php echo QUICKSEARCH; ?>" name="serendipity[searchButton]" title="<?PHP echo GO; ?>" style="width: 2em;" />
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user