File: search.rb

package info (click to toggle)
hiki 0.8.6-1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 1,772 kB
  • ctags: 1,746
  • sloc: ruby: 20,067; lisp: 926; sh: 269; makefile: 10
file content (21 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# search.rb - search plugin for Hiki
# Usage: just only {{search_form}} in your page.
# See http://www.usability.gr.jp/alertbox/20010513.html in detail.
# Copyright (C) 2003 Hajime BABA <baba.hajime@nifty.com>

def search_form
  <<EOS
<form action="#{@conf.cgi_name}" method="get">
  <input type="text" name="key" size="15">
  <input type="submit" name="comment" value="#{search_post_label}">
  <input type="hidden" name="c" value="search">
</form>
EOS
end

export_plugin_methods( :search_form )

unless respond_to?( :search )
  alias :search :search_form
  export_plugin_methods( :search, :search_form )
end