OpenWetWare:Software/Projects/Local Search

From OpenWetWare

Jump to: navigation, search

The search is accessed via a template: There are no arguments required. Just drop in the tag and you have a local search box. It's not elegant but it works pretty well.

{{GoogleSearch}}

Please post any comments on the following discussion page:

Local_Search/Discussion


Please use this as the way you deploy the search. If you look inside of it, you will note that there is a single parser tag,

<google />

Please use the template rather than the tag. As i add aditional parameters, I'll continue to support the template.

Just place the following tag anywhere in a page hierarchy and it will create a search box that will only search the hierarchically descending pages.

Example:

Search OpenWetWare:Software/Projects/Local Search


Thanks once more to Austin for suggesting this approach. And thanks to Google for religiously searching OWW on a regular basis to make it possible.

There are a few enhancement I'm going to add next.

1. When you hit search with nothing in the box, Google currently will return all of the pages. This isn't a bad thing but it's not necessary. Instead, hitting search with nothing in the search box will do.....

nothing!

  • wjf 02:33, 15 February 2008 (CST):Done

2. This won't immeiately work for private wikis. I'm adding support so that it will locate the current website next. This isn't a big deal but it's useful enough that Barry may want to use it in his private wiki and currently won't be abe to.

  • wjf 02:33, 15 February 2008 (CST):Done (not relevant since Google doesn't get searched by google.


3. Google provies a more exensive Javascript library to allow more complex search features. I'll add support for this when I have time. This is a low priority.

4. Currently,the pages returned are displayed on Google's website. I want to redirect the content back to a local OWW page so that there won't be a jarring experience of searcing and leaving then returning. I can use an html iframe for this but I hate to do this for security reasons. The good thing is that the results will always be limited to OWW so this may not be a huge problem.

After clearing this up, I'll take my 'experience' in seeing how people use this back to the native OWW search engine and see if we can better handle results in a more timely manner.

New Features

1. the search now shows the page range it will search. Example:

Tag:

<google />

Output:

Search OpenWetWare:Software/Projects/Local Search


2. You can provide an alternate page to search with the tag by enclosing it between an opening and closing tag.

Tag:

<google>Protocols</google>

Output:

Search Protocols


3. This extension can be used in other wikis besides the main OpenWetWare site.

To configure this extension for other private wikis, add the following to the Wiki's WikiSettings.php file :

$wgGoogleSiteBase = "yeastpheromonemodel/openwetware.org/wiki";

Thanks.

B.

Personal tools