[2.0.6] Automatic Moderator Rank

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
14
47%
Very Good
6
20%
Good
7
23%
Fair
1
3%
Poor
2
7%
 
Total votes: 30

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28070
Joined: Sat Aug 16, 2003 7:36 am

[2.0.6] Automatic Moderator Rank

Post by Extensions Robot »

MOD Name: Automatic Moderator Rank
Author: tosspot
MOD Description: Moderators will automatically assume the rank of Moderator (and associated image) in forums in which they have moderator status. In other forums they will appear as their normal rank.

MOD Version: 1.0.2


Download File: Automatic_Moderator_ Rank-1.0.2.mod
File Size: 5243 Bytes
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

AbelaJohnB
Former Team Member
Posts: 5674
Joined: Fri Jul 06, 2001 11:56 pm

Post by AbelaJohnB »

MOD Validated/Released :mrgreen:



Personal Notes:
This is a MOD updated from the old 2.0.4 database. Many thanks to tosspot for taking the time to update and resubmit!

Tuurbo
Registered User
Posts: 9
Joined: Fri Sep 12, 2003 6:43 pm
Location: The Netherlands

Post by Tuurbo »

Nice one! Works also fine with EasyMOD alpha3 (0.0.10a) :)
Read error : 54 (Connection reset by peer). One day I will find that peer and reset his connection!

cutom
Registered User
Posts: 6
Joined: Fri Sep 19, 2003 2:04 am

Post by cutom »

I got this error when trying to view a topic after installed AMR

Parse error: Parse error "&" in viewtopic.php 830

Code: Select all

if ( !$db->sql_query($sql) )
{
	message_die(GENERAL_ERROR, "Could not update topic views.", '', __LINE__, __FILE__, $sql);
}

// ----> LINE 830 <----
// Automatic Moderator Rank MOD
//

$sql = "SELECT u.user_id
	FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
	WHERE aa.auth_mod = " . TRUE . "
                AND aa.forum_id = $forum_id
		AND ug.group_id = aa.group_id
		AND g.group_id = aa.group_id
		AND u.user_id = ug.user_id";
if ( !($result = $db-&sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
$forum_moderators = array();
while( $row = $db-&sql_fetchrow($result) )
{
	$forum_moderators[] = $row['user_id'];
}

//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
Any suggestion ??

CyanBlue
Registered User
Posts: 409
Joined: Mon Jul 28, 2003 9:55 am

Post by CyanBlue »

Hm... I don't know much of PHP, but you could try this... and blame me if it doesn't work for you... :D

Find this...
$db-&sql_query

change it to
$db->sql_query


Find this...
$db-&sql_fetchrow

change it to
$db->sql_fetchrow

cutom
Registered User
Posts: 6
Joined: Fri Sep 19, 2003 2:04 am

Post by cutom »

Thanks, you are right, but i don't know when i downloaded this mod, all ">" becomes "&" and all "<" becomes "&" , I converted back and it work great. Thanks again

CyanBlue
Registered User
Posts: 409
Joined: Mon Jul 28, 2003 9:55 am

Post by CyanBlue »

Glad to be of your service... ;)

quentin
Registered User
Posts: 197
Joined: Tue May 20, 2003 7:30 am
Location: Geneva, Switzerland
Contact:

Post by quentin »

mmm interesting i had implemented something similar but this one seems done a bit better than my quick and dirty one, i guess i'll switch.

Quentin
The largest message boards on the web !
Web Design Library (coming soon)
Friends sites: Heroes of might and magic - Biometric security

User avatar
nota
Registered User
Posts: 75
Joined: Sun Jun 01, 2003 9:42 pm
Name: Joe
Contact:

Post by nota »

Very good, much better than having mods have their ranks all over the place. However, is their a way of making global mods (in my case, moderators with a different usergroup, and thus rank img) have their default rank img in admin forums?

Basically, I have moderators, moderators with a special UG, and then admins. I want the "global" moderators to have their images in the forums, but only admins have them in the moderator-only boards. Get what I mean?


I'm assuming it would be something like: if board = ##, and unless rank = admin, use the regular img. Of course, thats obivously not any real prgm language.

User avatar
Otherland
Registered User
Posts: 9
Joined: Sat Sep 27, 2003 5:36 pm
Location: Denmark

multi language enabled

Post by Otherland »

Hi ...

I've got a minor mod to this very good mod.
I'm running a forum, with Danish and English language, and noticed that the rank had to be called Moderator, instead of the danish word for it,
in order for it to work.

So...I made a small change to the mod...

In the file viewtopic.php, where it says the following :

else if ( in_array($postrow[$i]['user_id'],$forum_moderators) )
{

$moderator_rank_name = "Moderator";

change that to :

else if ( in_array($postrow[$i]['user_id'],$forum_moderators) )
{

$moderator_rank_name = $lang ['Moderator'];


Of cause you have to have a rank by that name. E.g. in Danish the word for 'moderator' is 'redaktør'.
So you need a rank called 'Redaktør' and for it to work in english too...also one called 'Moderator'.

Now you can switch between the languages.. and show that word for moderator in the selected language.

UPDATE : Remember to go into the users profile and change the rank to "no special rank", else it wont work right (or at all).

I hope it can be to anyones use.

Otherland
Last edited by Otherland on Mon Sep 29, 2003 8:48 pm, edited 1 time in total.

needshelp2
Registered User
Posts: 56
Joined: Sun Sep 21, 2003 11:01 pm

Post by needshelp2 »

hey, thats handy!
my ranks are different too, so this is useful.

Jenestasia
Registered User
Posts: 4
Joined: Thu Sep 25, 2003 12:31 am

Post by Jenestasia »

This mod won't work for me. I did it twice to make sure I'd followed the instructions exactly. Did each step, entered in the correct name for my moderator rank, uploaded the modified files.... No errors, it just doesn't work. Unless it only works on new posts the moderators make, and not ones posted prior to mod installation??

needshelp2
Registered User
Posts: 56
Joined: Sun Sep 21, 2003 11:01 pm

Post by needshelp2 »

thats what id think.

since the posts are past, theyre like sigs, you should update the tables to reflect the new settings.

User avatar
nota
Registered User
Posts: 75
Joined: Sun Jun 01, 2003 9:42 pm
Name: Joe
Contact:

Post by nota »

They do change the old posts.

On mine, I had all my moderators under the rank "Moderator" or whatever. I had to go into their profiles and change them to "no special rank" in order for it to work.

Bradman
Registered User
Posts: 84
Joined: Mon Nov 11, 2002 6:39 am
Location: Ledyard, CT
Contact:

Post by Bradman »

What if I use different images for different moderators? Seems like it wouldn't work for that.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”