plugin:searchform
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:searchform [2014-06-19 23:58] – Klap-in | plugin:searchform [2024-02-08 08:34] (current) – old revision restored (2024-02-08 07:16) date correct, commit log was copy paste error 2a02:a44a:3b00:1:41c4:9e04:ded6:a58b | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== searchform | + | ====== searchform |
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
- | author | + | author |
- | email : code@infinicode.org | + | email : klapinklapin@gmail.com |
type : syntax | type : syntax | ||
- | lastupdate : 2008-10-10 | + | lastupdate : 2024-02-08 |
- | compatible : 2008-05-05 | + | compatible : Greebo, Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : search, form, include | + | tags : search, form |
- | downloadurl: | + | downloadurl: |
+ | sourcerepo : https://github.com/Klap-in/dokuwiki-plugin-searchform | ||
+ | bugtracker : https:// | ||
---- | ---- | ||
- | ===== Download and Installation ===== | + | ===== Installation ===== |
- | Download | + | Search |
- | * {{http:// | + | ===== Syntax ===== |
- | You can also get the svn version using this command: | + | To include a searchform in any page you add the syntax: |
- | * '' | + | < |
+ | {searchform} | ||
+ | </code> | ||
- | To install ither extract | + | It will show a search box that searches default in the namespace where that page is. |
+ | |||
+ | To perform searches in other namespaces you add the option '' | ||
+ | < | ||
+ | {searchform ns=wiki} | ||
+ | {searchform ns=} | ||
+ | {searchform ns=other: | ||
+ | {searchform -ns=exclude: | ||
+ | </ | ||
+ | These boxes searches respectively in '' | ||
- | ===== Syntax ===== | ||
- | To use this plugin, just add '' | + | =====Layout===== |
+ | This plugin | ||
- | ===== More information ===== | + | ===Last commits=== |
+ | {{rss> | ||
- | You can get more information on the plugin' | ||
===== Development ===== | ===== Development ===== | ||
- | A fork is available at [[https:// | + | This plugin |
Changes: | Changes: | ||
- | * The searchform | + | * The searchform |
+ | * or searches the namespace given by syntax | ||
* Multiple searchforms at one page are possible | * Multiple searchforms at one page are possible | ||
* Reformatting and refactoring of the code | * Reformatting and refactoring of the code | ||
- | ===== Source ===== | + | Previous release by [[code@infinicode.org|Adolfo González Blázquez]], |
- | <file php lib/ | + | |
- | <?php | + | |
- | /** | + | |
- | * Plugin Search Form: Inserts a search form in any page | + | |
- | * | + | |
- | * @license | + | |
- | * @author | + | |
- | */ | + | |
- | + | ||
- | // must be run within Dokuwiki | + | |
- | if(!defined(' | + | |
- | if(!defined(' | + | |
- | require_once(DOKU_PLUGIN.' | + | |
- | + | ||
- | /** | + | |
- | * All DokuWiki plugins to extend the parser/ | + | |
- | * need to inherit from this class | + | |
- | */ | + | |
- | class syntax_plugin_searchform extends DokuWiki_Syntax_Plugin { | + | |
- | + | ||
- | function getInfo(){ | + | |
- | return array( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | } | + | |
- | + | ||
- | function getType() { return ' | + | |
- | function getSort() { return 138; } | + | |
- | + | ||
- | function connectTo($mode) { | + | |
- | $this-> | + | |
- | } | + | |
- | + | ||
- | function handle($match, | + | |
- | return array($match, | + | |
- | } | + | |
- | + | ||
- | function render($mode, | + | |
- | + | ||
- | | + | |
- | + | ||
- | if ($mode == ' | + | |
- | $renderer-> | ||
- | $renderer-> | ||
- | $renderer-> | ||
- | $renderer-> | ||
- | if($ACT == ' | ||
- | if(!$autocomplete) $renderer-> | ||
- | $renderer-> | ||
- | $renderer-> | ||
- | if($ajax) $renderer-> | ||
- | $renderer-> | ||
- | $renderer-> | ||
- | return true; | ||
- | } | ||
- | return false; | ||
- | } | ||
- | } | ||
- | ?> | ||
- | </ |
plugin/searchform.1403215126.txt.gz · Last modified: 2014-06-19 23:58 by Klap-in