Firefox PHP

Search Unanswered Topics Module (5.1 and 5.2 ready)

All files from this thread

File Name File Size   Posted by Date  
search_unanswered-1.1.0.zip 13.4 KB open | download Oliver Riesen-Mallmann 09/07/2006 Read message
Search Unanswered Topics Module (5.1 and 5.2 ready)
August 02, 2006 09:53AM
Search Unanswered Topics Module (5.1 and 5.2 ready)

Adds search for unanswered topics.

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

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.

Installation:

1. Unpack the archive.

2. Move the directory "search_unanswered" to the directory "mods" within your Phorum installation. Don't change the directory name!

3. Move search-unanswered.php to your phorum-directory. Rename the file if you want to use a localised file name (in this case you have to change the file name also in the settings).

4. Move search-unanswered.tpl, search-unanswered-form.tpl and search-unanswered-form-header.tpl to your template-directory.

5. To show a link to the search unanswered topic page on the list page, edit list.tpl and list_threads.tpl. Add the following code just behind the •{INCLUDE "loginout_menu"}:

{IF URL->SEARCH_UNANSWERED}&bull;<a class="PhorumNavLink" href="{URL->SEARCH_UNANSWERED}">{LANG->SEARCH_UNANSWERED}</a>{/IF}

6. To show a search form, edit search.tpl. Add the following lines just before
the last </table>.

6a. If you're using only the Search Unanswered Topics Module:

  <tr>
    <td>&nbsp;</td>
    <td style="width: 10px">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td class="PhorumStdBlockHeader PhorumNarrowBlock" style="text-align:
 left;">{INCLUDE "search-unanswered-form-header"}</td>
    <td style="width: 10px">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td class="PhorumStdBlock PhorumNarrowBlock" style="padding: 10px;">
      {INCLUDE "search-unanswered-form"}
    </td>
    <td style="width: 10px">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

6b. If you're using the Search Unanswered Topics and Search Hot Topics Modules
together:

  <tr>
    <td>&nbsp;</td>
    <td style="width: 10px">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td class="PhorumStdBlockHeader PhorumNarrowBlock" style="text-align: left;">{INCLUDE "search-unanswered-form-header"}</td>
    <td style="width: 10px">&nbsp;</td>
    <td class="PhorumStdBlockHeader PhorumNarrowBlock" style="text-align: left;">{INCLUDE "search-hot-topics-form-header"}</td>
  </tr>
  <tr>
    <td class="PhorumStdBlock PhorumNarrowBlock" style="padding: 10px;">
      {INCLUDE "search-unanswered-form"}
    </td>
    <td style="width: 10px">&nbsp;</td>
    <td class="PhorumStdBlock PhorumNarrowBlock" style="padding: 10px;">
      {INCLUDE "search-hot-topics-form"}
    </td>
  </tr>

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

8. Enable the module "Search Unanswered Topics Module".

Update from 1.0 to 1.1:

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

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 Unanswered Topics Module.

Changelog:

2006/08/02 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)
- Extended Readme.

2006/08/04 version 1.0.2 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


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 3 time(s). Last edit at 09/07/2006 05:52AM by Oliver Riesen.
Attachments:
open | download - search_unanswered-1.1.0.zip (13.4 KB)
Re: Search Unanswered Topics Module (5.1 and 5.2 ready)
September 07, 2006 05:53AM
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 Unanswered Topics Module (5.1 and 5.2 ready)
March 02, 2007 09:49AM
Hi Oliver,
I'm having an problem with your Mod.

I installed it following the instructions but it seems to break the search function.
When I click on the 'search' link in the main index's NavBar I get the error message:

Template problem: file "./templates/MyTemplate/"search-unanswered-form-header".tpl" does not exist

When I click on 'Unanswered Topics' in the Navbar while in a forum I briefly see the search in progress page, then I get this error message:

Template problem: file "./templates/MyTemplate/"loginout_menu".tpl" does not exist


I checked and made sure the 'search-unanswered.tpl', 'search-unanswered-form.tpl' and
'search-unanswered-form-header.tpl' are in the appropriate locations in each of my template sub-folders under /%PHORUM ROOT%/Templates

I also verified the 'loginout_menu.tpl' was still in its correct location(s).

I opened the Phorum Admin page and ran the 'Sanity Check' and it reports "ALL IS OK". As an additional sanity check, I reviewed the instructions and went back & verified I did everything correctly and all files were in their correct locations.

I opened each .php and .tpl related to this mod, but didn't find anything obviously wrong. I noticed in the error message, the file name was inside s 2nd set of quotes.
Just for kicks and gigles, I opened Wordpad and searched for that exact string, (a file name inside quotes, not found nothing.

I'm running Phorum on Windows Server 2003 (no firewall) w/ IIS
the remote browser is IE7. I also tested this on IE6 and the same error messages were observed.

Have any ideas on what to look for next?
Thanks,
-Mike



Edited 2 time(s). Last edit at 03/02/2007 10:30AM by mjm0771.
Re: Search Unanswered Topics Module (5.1 and 5.2 ready)
March 02, 2007 11:21AM
Hi Mike,

Quote
mjm0771
I'm having an problem with your Mod.

The syntax for the include-statement in templates changed from version 5.1 to 5.2. You have to delete the quotes. For example replace

{INCLUDE "loginout_menu"}

by

{INCLUDE loginout_menu}

In a future version I'll include different templates for 5.1 and 5.2 like I did already in the Search Hot Topic module.

Regards
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.
Re: Search Unanswered Topics Module (5.1 and 5.2 ready)
March 02, 2007 12:13PM
Great thanks!
I found the instances of the exmaple you pointed out in the search-unanswered.tpl file.

I also looked in search.tpl and removed the quotes from the the INLUDE statements that were added. (I did this with all templates)

Also found I had to remove the quotes from the {INCLUDE "paging"} statements in search-unanswered.tpl (again, in all active templates)

Its working great now,
Thanks for the help!
-Mike
Re: Search Unanswered Topics Module (5.1 and 5.2 ready)
April 11, 2012 09:00AM
Hi,

We just installed the latest version of Phorum, and I do not see the lines referenced in the 2 template files (install step 1).
I activated the mod, but do not see the code change in the Phorum.

Thanks,
joan
Sorry, only registered users may post in this forum.

Click here to login