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:
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2006-11-22 - ArthurClemens
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.