[Pmwiki-users] An idea before I forget: Search form in the search results page
Thu Jan 8 04:31:21 CST 2004
On Tue, 6 Jan 2004, Patrick R. Michaud wrote:
> I don't remember exactly why I didn't put a search form on the search
> results page, but I think I had a reason at the time. At any rate, it's
> easy to add--just set $PageSearchFmt in local.php to include a search
> from. I tried the following on pmichaud.com and it worked:
> $PageSearchFmt = "<h1>\$WikiImg $[Search Results]</h1>
> <form action='\$PageUrl' method='get'><input
> type='hidden' name='action' value='search' /><input type='text'
> name='text' value='$text' size='40' /><input type='submit'
> value='$[Search]' /></form>
> <p /><dl>\$MatchList</dl>
> <p />$[SearchFound]
> <hr /><small>
> <a href='\$ScriptUrl/$[PmWiki/WikiHelp]'>$[WikiHelp]</a> -
> <a href='\$ScriptUrl/$[Main/SearchWiki]'>$[SearchWiki]</a><br />
> $[Search performed on \$LastModified]</small>";
> This is the same as the normal $PageSearchFmt string except it
> adds the <form ...>...</form> to prompt for a new search in the
> search results.
Thanks, I'm using it now and it works well. If you like I could copy the
above (and the related stuff about setting the focus) to a cookbook page.
However, IMO this should be a part of the standard distribution, at least
as something you can enable like this:
$EnableSearchFormInSearchPage = 1;
That reminds me... from the perspective of someone who searches
pmichaud.com quite often, I really miss not having a search form
easily available (in the header or the footer). A similar enable-variable
for this could be called:
$EnableSearchFormInHeaders = 1;
Dr. Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users