(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: search.ml,v 1.6 2004/11/02 18:47:54 rich Exp $
+ * $Id: search.ml,v 1.7 2004/11/02 19:21:17 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
let run r (q : cgi) (dbh : Dbi.connection) hostid host user =
let template = get_template dbh hostid "search.html" in
+ template#set "canonical_hostname" host.canonical_hostname;
+
(* Get the query, if it exists. *)
let query = try q#param "q" with Not_found -> "" in
let have_query = not (string_is_whitespace query) in
Search our site for this page:
</p>
-<form method="post" action="/_bin/search.cmo">
+<form method="post" action="/_search">
<p>
-<input name="q" value="::search_terms_html_tag::" size="50"/>
-<input type="submit" value="Search"/>
+<input name="q" value="::search_terms_html_tag::" size="70"/><input type="submit" value="Search"/>
</p>
</form>
<ul>
<li> Use fewer words. </li>
<li> <a href="/_sitemap">Try browsing the sitemap.</a> </li>
+<li> <a href="http://www.google.com/search?q=site:::canonical_hostname_url::+::query_url::">Try the same search on Google.</a>
</ul>
::end::