Provide a better way to show search results.
This recipe uses ajax to provide a preview of the found pages (see example here).
- Download the package xajaxsearch.zipΔ and put all files in the appropriate folders
- Write in your
config.phpas the last entry:
$XajaxInclude = "xajaxsearch"; include_once("
- Put in your skin .tmpl file right before the
- Replace on your search site (Site.Search):
I just wanted to play a little bit with ajax and this receipt was the result. Because it is not completly useless I put it up here.
This receipt was tested with Safari, Opera, Firefox and Camino.
The recipe works fine with PmWiki 2.0.12. Between this version and 2.1 it breaks and needs to be updated.
- This is nice and all, but shouldn't the Ajax stuff all be separated out. At a quick glance it looks like all one needs is the xajaxpmwikiglue.common.php, generateargs.php and xajax.inc.php files to get basic Ajax functionality (using the include_once("
$FarmD/cookbook/xajaxpmwikiglue.common.php"); line). Then just add your own code to built some new Ajax actions for your wiki. Is this is the case? If so, I say it should be separated out into its own recipe, and then any recipes that use it (like xajaxsearch) would list the xajax recipe as a dependency. Just a suggestion. (Waylan October 27, 2005, at 02:32 PM)
Yes. I thought about this direction too and this is why I already started splitting up the files in this way. But I didn't decided yet what would be the easiest way and is it really clever to use a <div> and ParseArgs() arguments to interchange between PmWiki and xajax. From my php amateur point of view it is ;). So I really appreciate your comments. - Schlaefer October 29, 2005, at 03:52 AM
On the latest version I tried to simplify the process and put all the glue stuff into one single file. To get things started I ported a simple example from the xajax homepage that reflects the current usage. - Schlaefer October 29, 2005, at 02:41 PM