Search Hot Topics Module (5.1 and 5.2 ready)

Adds search for hot (most discussed) topics.

Tested on version 5.1.16a and CVS (till revision 1374) for MySQL. DB-layer for
mysqli and postgresql included but not tested. Please give me a feedback if
this parts are working for you.

You have to use at least version 5.1.16 of Phorum.

No support for the blog template.

License:
-------
Free to use, modify, or redistribute this code so long as I am given credit for
the original development somewhere. This code comes with absolutly no warranty.

Easy Installation:
-----------------
Easy installation offers the minimum effort to include this module in your
Phorum and simplify future updates of this module.

1. Unpack the archive.

2. Move the directory "search_hot_topics" to the directory "mods" within your
   Phorum installation. Dont change the directory name!

3. If you use a custom template you have to copy the default template directory
   of this module. For example if your template calls "foo" you have to copy
   /mods/search_hot_topics/templates/default (or default2) to
   /mods/search_hot_topics/templates/foo.

4. To show a link to the search hot topic page, you have to add a new hook:

{HOOK "tpl_add_navigation"}

4a. In version 5.1

   Edit list.tpl and list_threads.tpl. Add the above code just behind the
   &bull;{INCLUDE "loginout_menu"}.

4b. In version 5.2 (new template default2)

   Edit header.tpl. Add the above code just before the </form>.

5. To show a search form, you have to add a new hook to search.tpl:

{HOOK "tpl_search_forms"}

For the default template put the hook just before the last </table>. If you
are using the new default2 template put the hook before {IF SEARCH->noresults}.

6. Login as administrator in Phorums administrative interface and go to the
   "Modules" section.

7. Enable the module "Search Hot Topics Module".

Advanced installation:
---------------------
The advanced installation is OPTIONAL.

If you want to use a localised file name for the search hot topics page or get
a better ranking in popular search engines, you have to do some ADDITIONAL
installation steps:

1. Move search-hot-topics.php to your phorum-directory. Rename the file if you
   want to use a localised file name.

2. Login as administrator in Phorums administrative interface and go to the
   "Modules" section.

3. Go to settings for the "Search Hot Topics Module".

4. Uncheck "Use module as add-on" and if desired change the file name.

5. Save settings.

Module settings:
---------------
1. Use module as add-on

If this option is checked, the module is integrated as an add-on; this is the
easiest way to install this module and simplify future updates of this module.
Uncheck this option if you want to use a localised file name for the search
page or get a better ranking in popular search engines, in this case you have
to follow the advanced installation instruction.

The default value is "checked".

2. File name of the search hot topics page

Change the file name if you want to use a localised name. Dont add the file
extension ".php". Take care that you have to change also the file name in the
file system!

The default value is "search-hot-topics".

Update from 1.x to 1.3:
----------------------
Follow easy installation instructions. Additional disable and enable the module
once.

Remove obselete files (if exists):
- /mods/search_hot_topics/search-hot-topics.tpl
- /mods/search_hot_topics/search-hot-topics-form.tpl
- /mods/search_hot_topics/search-hot-topics-form-header.tpl
- /mods/search_hot_topics/templates/search-hot-topics-form.tpl
- /mods/search_hot_topics/templates/search-hot-topics-form-header.tpl
- /templates/default/search-hot-topics.tpl
- /templates/default/search-hot-topics-form.tpl
- /templates/default/search-hot-topics-form-header.tpl

If you copied this files to your custom template directory, remove them also.

Language support:
----------------
This module supports multiple languages.

The following languages are included:

- Englisch
- German (Sie)
- German (Du) male
- German (Du) female

If you want to translate the module to a new language, youll have to do the
following:

Copy lang/english.php to lang/yourlang.php (yourlang.php must have the same
name as Phorums main language file that you use). After this, translate the
strings in lang/yourlang.php.

If you have created a translation for this module, please post a zip file
containing lang/yourlang.php in the module thread at phorum.org, so the
translation can be added to the module package. See:
http://www.phorum.org/phorum5/read.php?16,115035,115035

Sanity Checks:
-------------
If you have problems with this module login as administrator in Phorums
administrative interface and go to the "System Sanity Checks" section. Check
for warnings or errors for the Search Hot Topics Module.

Changelog:
---------
2006/08/03 version 1.0.0 Initial version by Oliver Riesen (oliver@riesen.org)

2006/08/04 version 1.0.1 by Oliver Riesen (oliver@riesen.org)
- Bug fix: missing match_forum in page links.

2006/09/07 version 1.1.0 by Oliver Riesen (oliver@riesen.org)
- Support for future version 5.2.
- Added change sets:
  - 1204 (http://www.phorum.org/cgi-bin/trac.cgi/changeset/1204),
  - 1260 (http://www.phorum.org/cgi-bin/trac.cgi/changeset/1260),
  - 1229 (http://www.phorum.org/cgi-bin/trac.cgi/changeset/1299),
  - 1330 (http://www.phorum.org/cgi-bin/trac.cgi/changeset/1330).
- Added sanity checks.

2006/09/08 version 1.2.0 by Oliver Riesen (oliver@riesen.org)
- Added change set
  - 1340 (http://www.phorum.org/cgi-bin/trac.cgi/changeset/1340)
- Added auto-installation of default settings.
- Added support for addon-script.
- Added mod-templates support.
- Extended sanity checks.

2006/09/28 version 1.3.0 by Oliver Riesen (oliver@riesen.org)
- Search form and navigation link now included by additional hooks.
- Some HTML fixes.
- Extended documentation.
- Added default2 templates fot future version 5.2.
- Added change set:
  - 1361 (http://www.phorum.org/cgi-bin/trac.cgi/changeset/1361).
- Bug fix: missing profile field when calling settings just after enabling the
  module.

ToDo:
----
- Search in folder.
- Function to get first n results in array to include result list in index or
  list page.
- Including all search modules in one package (but still each module apart)
  with additional installation instruction to put all search links in an own
  navigation bar.
- Combination of all additional searches with the core search.