[pmwiki-users] Mixed Search results. Google + PMWiki

Ben Wilson dausha at gmail.com
Wed Apr 25 06:29:52 CDT 2007


Google has an AJAX search API (GSA, let's call it), similar basic
approach to Google Map API.[1] So, it is possible to create a function
that triggers the search in Goggle then feeds to PmWiki's search.
Here's a rough idea on the flow:

1. Visitor sends query.
2. Helper function generates javascript.
3. Helper function calls PmWiki search, which displays the page.

The GSA feeds the search results into an id'd DIV (e.g. <div id='gsa'
/>). So, on the search results page, you put a div (:div
id='gsa':)(:divend:) where you want the GSA search to be displayed
(e.g. before or after the PmWiki search).

Based on my own experience, you will want to feed any inline
javascript you produce into the HTMLFooter, which avoids problems with
certain browsers.[2]


[1]: http://code.google.com/apis/ajaxsearch/documentation/
[2]: http://pmichaud.com/wiki/PmWiki/LayoutVariables#HTMLFooterFmt;
http://pmichaud.com/wiki/Cookbook/SkinGuidelines

On 4/25/07, Nicholas Buttle <nicholas_buttle at yahoo.com> wrote:
> Hi
>
> I thought about putting the google search recipie on
> our site (leading to 2 input boxes on the front
> page...ugh) but then it occurred to me to find out
> whether it would be possible to have a single search
> box that returned mixed results.  So for example a
> search on 'xyz' might return the top 10 'xyz' from the
> pmwiki and then the top '10' from google.
>
> I imagine this is asking a lot.
>
> Anyone?
>
> TIA
>
> Nicholas
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>


-- 
Ben Wilson
"Words are the only thing which will last forever" Churchill



More information about the pmwiki-users mailing list