Module  : Search Spelling
Version : 1.0.3
Author  : Maurice Makaay <maurice@phorum.org>

This module queries Google's search engine for each search request
to implement a "Did you mean ...?" function for the Phorum search pages.
This will suggest alternative spellings for words that are possibly
misspelled in the search query.


Requirements:
-------------

To be able to query the Google web site, PHP must be configured to allow
opening of URLs for file reading commands. This means that the php.ini
option "allow_url_fopen" must be set to 1. If this option is disabled,
then this module will not work.


Installation:
-------------

- Unpack the archive;

- Move the directory "search_spelling" to the directory "mods"
  within your Phorum installation;

- Login as administrator in Phorum's administrative interface and
  go to the "Modules" section;

- Enable the module "Search Spelling".

- Edit the settings for the module, to configure the language to
  use for the Google searches.


Customization:
--------------

This module makes use of a module template for formatting the
"Did you mean ..." link. If you want to modify this template to make
it work better for your site's template, then do not edit the template
file from the module distribution directly. Instead, copy the full directory
"mods/search_spelling/templates/emerald" to
"mods/search_spelling/templates/yourtemplatename" (asuming that your site's
template is stored as "templates/yourtemplatename") and edit the template
in the new directory. Phorum will automatically recognize that you have
created a specific template set to use for your site's active template.

In the settings for the module, you can choose whether you want the
"Did you mean ..." link to be displayed automatically or not. If
automatic displaying is enabled, then the link will be shown after the
page header. If automatic displaying is disabled, then you can place
the link in your page template, using the following template variables:

* {SEARCH_SPELLING_LINK}
  The fully formatted "Did you mean ..." link, based on the module template.

* {SEARCH_SPELLING->QUERY}
  The alternative search query words.

* {SEARCH_SPELLING->URL}
  The URL that can be used to run the alternative query.

* {LANG->mod_search_spelling->DidYouMeanPre}
  {LANG->mod_search_spelling->DidYouMeanPost}
  Strings from the module language file.

