Tags:
search1Add my vote for this tag create new tag
, view all tags

Question

The twiki.org support web has a Google AJAX search option.

How can I Implement such a search in my Twiki pages?

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RH Linux
Web server: apache
Perl version: 5.008
Client OS: WindowsXP? Linux Mac
Web Browser: IE firefox
Categories: Search

-- PeterJones - 21 Nov 2006

Answer

See GoogleAjaxSearchPlugin.

-- ArthurClemens - 21 Nov 2006

Great thanks for the quick reply. I have installed it and it seems to work ok, except that GOOGLESEARCHWEB does not get resolved

-- PeterJones - 21 Nov 2006

Did you incidentally add a space after the web name?

-- ArthurClemens - 21 Nov 2006

Hello

I have tried

 %GOOGLESEARCHWEB% 
placed after
 %GOOGLEAJAXSEARCH% 

I had spaces before and after the % signs

It gets resolves in the Plugin topic but not in topics in other webs.

-- PeterJones - 22 Nov 2006

Could you please add your complete code (without key), this will make it easier to pinpoint the problem.

-- ArthurClemens - 22 Nov 2006

It is a copy of the code from the example

%GOOGLEAJAXSEARCH%

<div class="googleAjaxSearch">
<strong>Search %GOOGLESEARCHWEB% </strong><input class="twikiInputField" size="55" id="googleAjaxSearchInputElement" value=""/>
<input type="hidden" id="googleAjaxSearchWeb" value="myWeb" />
<span class="twikiGrayText twikiSmallish">(results by Google !AJAX - Beta)</span>
<div id="googleAjaxSearchControl"></div>
</div><!--//googleAjaxSearch-->

The settings in the Plugin are as follows

 Settings
For an explanation of the following variables read above. These are example variable values:

    * Set GOOGLEKEY = xxxxxxxxxxxx
    * Set GOOGLESEARCHWEB = Main
    * Set GOOGLESEARCHSITE = https://twiki.cern.ch/twiki/bin/view/
    * Set GOOGLESEARCHLABEL = TWiki at CERN
    * Set SHORTDESCRIPTION = Dynamic Google AJAX search service for public TWiki sites 

-- PeterJones - 22 Nov 2006

Currently only settings in the plugin topic are read. I am working on an update, expect it today.

-- ArthurClemens - 22 Nov 2006

I have updated the plugin. See GoogleAjaxSearchPlugin.

Note that your Google key must be valid for the directory you are searching in, not the directory your search box is in.

-- ArthurClemens - 22 Nov 2006

 
Change status to:
Topic revision: r9 - 22 Nov 2006 - 16:42:17 - ArthurClemens
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback