[pmwiki-users] Quick pagename search?
Oliver Betz
list_ob at gmx.net
Thu Mar 1 12:15:01 CST 2007
update:
> how can I get a pagename substring search box instead of or in
> addition to the full text search box?
well, I hacked it, but I don't like it. Any hints to make it cleaner
are welcome.
An input form calls a TitleSearch page where I use the HTTP GET
variable to form the correct search pattern:
(:input form method=get action={$ScriptUrl}/Site/TitleSearch:)
(:input text name=tsq:)
(:input end:)
And TitleSearch contains:
(:if !equal {$tsq} '':)
(:pagelist name=*{$tsq}*:)
(:ifend:)
Since I didn't know a better way to access GET variables, I added
$FmtPV['$tsq'] = htmlspecialchars($_GET['tsq']);
to config.php. I feel there has to be a cleaner way, any hint?
Besides this, I would prefer a title search with additional
functionality like in PhpWiki: if there is only one matching page,
the user should be forwarded directly to this page.
This is a very conventient navigation method - you need little
keystrokes and mouse clicks if you know a unique part of the
pagename.
For example, if you have to edit the "DocumentationIndex" repeatedly,
it could be sufficient to type "oni" in the TitleSearch field. I use
this all the time in my PhpWiki and wouldn't like to miss it.
Oliver
--
Oliver Betz, Muenchen
More information about the pmwiki-users
mailing list