Firefox PHP

List Moderators

Posted by Chris Eaton 
List Moderators Module (5.1 ready)
April 21, 2006 04:17AM
List Moderators Module (5.1 ready)

List the moderators and (optional) administrators in a given forum. On the index pages the moderators are added to the forum description. On the list page the moderators are shown in a separate box.

Tested on version 5.1.15 and CVS (till revision 1248)

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:
------------
- Unpack the archive.

- Move the directory "listmoderators" 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 "List Moderators".

- Optional go to "Settings" for this module and change cache time, display options and sort order.

- Optional go to "General Settings" and change "Ignore Admin for moderator- emails" (last option on this page) to "No" if you want to display also administrators in the list of moderators.

Language support:
----------------
This module supports multiple languages (even if it is only one word).

The following languages are included:

- Englisch
- German
- German (Sie)

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.

Template change:
---------------
This module uses the stdblock template on the list page to show the list of moderators. If you want to change the layout, you'll have to do the following:

1. Copy stdblock.tpl in your template directory to listmoderators.tpl.

2. In listmoderators.php change line 20, replace:
        include phorum_get_template('stdblock');
with:
        include phorum_get_template('listmoderators');

3. Change the layout in listmoderators.tpl.

Debugging:
---------
If there are missing moderators or administrators in the list of moderators please try the following:

1. Go to "Settings" for this module and change "Cache Time" to "0" (zero).

2. Go to "General Settings" and change "Enable Caching Userdata" to "No"

3. Go to "General Settings" and change "Ignore Admin for moderator-
emails" (last option on this page) to "No".

Try again. Now all moderators and administrators should be shown.

Changelog:
---------
2004/05/21 version 1.0.0 by Chris Eaton (tridus@phorum.org)

2006/04/20 version 2.0.0 Oliver Riesen (oliver@riesen.org)
- Correcting error if a forum has no moderator; block is not shown in this case.
- Added national language support.
- Added option in the module settings to display user name or real name.
- Added option in the module settings to sort by user id, user name or real name.
- Added option in the module settings to strip parts of the real name (e.g. if the real name includes a role like "moderator" or "webmaster").

2006/05/04 version 2.0.1 by Oliver Riesen (oliver@riesen.org)
- Correcting error if there is no real name.

2006/08/09 version 2.1.0 by Oliver Riesen (oliver@riesen.org)
- On the index pages the moderators are added to the forum description.

2006/08/22 version 2.1.1 by Oliver Riesen (oliver@riesen.org)
- Extended documentation. Thanks to Michael Horton.

ToDo:
----
The option "Ignore Admin for moderator-emails" in "General Settings" should only affect email sending. Therefore the Phorum core function phorum_db_user_get_moderators should be corrected. See: [www.phorum.org]


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 7 time(s). Last edit at 08/22/2006 02:53AM by Oliver Riesen.
Attachments:
open | download - listmoderators-2.1.1.zip (5.7 KB)
Re: List Moderators Module, new Version
May 03, 2006 01:09PM
It doesn't work on my forum...
I'm running 5.1.11.
I created a french lang but impossible to use it ? huh ?

But the main problem is that I created moderator group with one member..and nothing appears except "Moderators" and below "," ?

Can u help me ?

Stephane
Re: List Moderators Module, new Version
May 04, 2006 10:25AM
Hi Stephane,

Quote
PocketPCdev
I created a french lang but impossible to use it ?

I'm using a german language file. It's working fine. Did you change the settings of your forum to use the french language file?

Quote
PocketPCdev
But the main problem is that I created moderator group with one member..and nothing appears except "Moderators" and below "," ?

Upps, small error in case there is no real name for the moderators. You will find a corrected version 2.0.1 in my old post.

Bye
Oliver
Re: List Moderators Module, new Version
May 06, 2006 12:58PM
The problem is that I can't make the "cache" directory 777 rights....my provider doesn't accept it...
Re: List Moderators Module, new Version
May 06, 2006 06:58PM
Talk to your provider. There should be a way to get the cache directory writable.

But I'm wondering if this is really your problem. If Phorum cannot use the cache directory, it will not function at all. It needs the cache directory for writing compiled templates for example. So if you can view your forums, the cache directory probably is okay. It might be that it's set to another directory than your ./cache directory in the Phorum directory (e.g. C:\Windows\Temp or /tmp, which are the default locations provided by Phorum). To be sure, check the general settings. There the cache location is specified.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: List Moderators
August 05, 2006 01:26PM
This is a great mod but when I turn it on all I get is only ONE moderator's name. The rest of my mods do not appear. Using latest version of Phorum.

Michael Horton
lafcpug
[www.lafcpug.org]
Re: List Moderators
August 05, 2006 02:43PM
Hi Michael,

Quote
Michael Horton
when I turn it on all I get is only ONE moderator's name. The rest of my mods do not appear.

Sure that there is more than moderator in the corresponding forum? The mod shows only these users which are moderators in the indicated forum. If the user is moderator in another forum he is not shown.

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: List Moderators
August 05, 2006 02:51PM
Yes. Although I am in testing mode on this forum there is 4 people I have given mod privileges too. And as the admin, shouldn't I myself be listed as a moderator? I'm not.

Michael Horton
lafcpug
[www.lafcpug.org]
Re: List Moderators Module, new Version
August 05, 2006 04:08PM
Hi Michael,

please download version 2.0.1 from my original post. This version works well. I changed the sort function in all my modules because of an bug report in one of my modules. But it seems that I mal corrected this module. And the sort function here was working already fine. Sorry.

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: List Moderators Module, new Version
August 05, 2006 05:18PM
Will do Oliver

Will report back with results

Thanks

Mike

Michael Horton
lafcpug
[www.lafcpug.org]
Sorry, only registered users may post in this forum.

Click here to login