Firefox PHP

Search Hot Topics Module (5.1 and 5.2 ready)

All files from this thread

File Name File Size   Posted by Date  
search_hot_topics-1.3.0.zip 18.7 KB open | download Oliver Riesen-Mallmann 09/28/2006 Read message
Search Hot Topics Module (5.1 and 5.2 ready)
August 03, 2006 11:25AM
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:

1. Unpack the archive.

2. Move the directory "search_hot_topics" to the directory "mods" within your Phorum installation. Don´t 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 •{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 Phorum´s 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 Phorum´s 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. Don´t 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:
- /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, you´ll have to do the following:

Copy lang/english.php to lang/yourlang.php (yourlang.php must have the same name as Phorum´s 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.

Sanity Checks:

If you have problems with this module login as administrator in Phorum´s 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
- 1260
- 1229
- 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
- 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.


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.




Edited 4 time(s). Last edit at 09/28/2006 03:08AM by Oliver Riesen.
Attachments:
open | download - search_hot_topics-1.3.0.zip (18.7 KB)
Re: Search Hot Topics Module (5.1 ready)
August 04, 2006 02:23AM
Can you kind of define what this module does? How does is calculate "hot topics".

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Search Hot Topics Module (5.1 ready)
August 04, 2006 02:34AM
Hi Brian,

Quote
brianlmoon
Can you kind of define what this module does? How does is calculate "hot topics".

The search gives a list of topic-starters (parent_id=0) ordered descending by number of posts in the corresponding thread (order by thread_count desc). Topics without responses are ignored (thread_count = 0).

Bye
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.




Edited 2 time(s). Last edit at 08/04/2006 02:35AM by Oliver Riesen.
Re: Search Hot Topics Module (5.1 and 5.2 ready)
September 07, 2006 05:51AM
New version 1.1.0:

2006/09/07 version 1.1.0 by Oliver Riesen (oliver@riesen.org)
- Support for future version 5.2.
- Added change sets
  - 1204
  - 1260
  - 1229
  - 1330
- Added sanity checks

Update from 1.0 to 1.1:

Follow installation instructions. Additional disable and enable the module once.


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Search Hot Topics Module (5.1 and 5.2 ready)
September 08, 2006 04:52PM
New version 1.2.0:

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.

Update from 1.x to 1.2:

Follow easy installation instructions. Additional disable and enable the module once.

Remove obselete files:
- /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
- /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.


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Search Hot Topics Module (5.1 and 5.2 ready)
September 28, 2006 03:10AM
Search Hot Topics Module (5.1 and 5.2 ready), new version 1.3.0

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
- Bug fix: missing profile field when calling settings just after enabling the module.


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Sorry, only registered users may post in this forum.

Click here to login