[RC1] PM Count MOD

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

[RC1] PM Count MOD

Post by ErDrRon »

MOD Title: PM Count MOD
MOD Description: Allows administrators and moderators to view the total number of PMs sent
by users in their Profile and on the Memberlist. This version has been tested and works with phpBB 2.0.22.
MOD Version: 1.1.RC1

MOD Download: http://www.erdrron.com/phpBB2/download.php?id=611
Last Stable version: 1.1.RC1

Demo Board: N/A
Demo Username: N/A
Demo Password: N/A

MOD History:
2007-11-06 - Version 1.1.1
- first release candidate

2007-05-17 - Version 1.1.1
- added Admin Userlist Add-on

2007-05-16 - Version 1.1.0
- added total PMs count to Memberlist

2007-05-15 - Version 1.0.0
- initial stable release
____________________________________________________________________________________

This MOD shows the total number of PMs a user has sent on their Profile page as well as on the Memberlist. Only Admins and Mods can view this new field. The number of PMs sent for every
user will start at zero once this MOD is installed and will increment by one each
time they send a PM afterwards. There is no way to know how many PMs were sent
prior to installation of this MOD as phpBB did not previously store that information.

I have included a set of pre-edited files in the contrib folder. You can copy these
pre-edited files directly to your server replacing the original phpBB files ONLY if you
have not modified the standard phpBB installation in any way. If you have already modified
any of the files in your current phpBB installation that will be replaced by the
pre-edited files in this MOD you may break your forum and it may no longer function
correctly.

I have, at the request of Dogs and things, included in the contrib folder an Add-on that allows Administrators to see the total number of PM's sent by users in the Admin Userlist 2.0.6c MOD.

While this version has only been tested and certified to work with phpBB version 2.0.22 it
likely will work with any phpBB 2.x.x version. If you need me to test it for a particular
version please let me know.

Please note that this MOD is NOT written to be EasyMod compatible (I haven't tested it).

This MOD was written at the request of sibry at:
http://www.phpbb.com/community/viewtopi ... &sk=t&sd=a

Cheers!
Ron
Last edited by ErDrRon on Tue Nov 06, 2007 10:16 pm, edited 10 times in total.
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] PM Count MOD

Post by Dogs and things »

Er Doc,

Nice job! :razz:
For phpBB2 support visit phpBB2refugees.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [BETA] PM Count MOD

Post by ErDrRon »

Dogs and things,

Thank you very much. I am currently adding the capability of seeing the total PM's sent in the Memberlist as well. Again, only the Admins and Mods will see this info.

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] PM Count MOD

Post by Dogs and things »

It would be nice if you could make this MOD compatible with Admin Userlist 2.0.6c so that we can see in the userlist the nº of PMs.

Allthough I guess that the current memberlist thingie will do virtually the same, allow us to see in one quick look many user´s pm count. ;)
For phpBB2 support visit phpBB2refugees.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [BETA] PM Count MOD

Post by ErDrRon »

I have the Memberlist module finished. I'll repackage the MOD and release it as version 1.1.0 in the next day or so. I'll add it to the Admin Userlist as a contrib next.

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [BETA] PM Count MOD

Post by ErDrRon »

I have repackaged the PM Count MOD as version 1.1.0. It now shows Administrators and Moderators the total number of PM's sent by each user in their respective profile pages as well as on the Memberlist. You can now see at a glance those users that utilize the PM system and to what extent. Enjoy!

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] PM Count MOD

Post by Dogs and things »

Cheers to you! :)
For phpBB2 support visit phpBB2refugees.
sibry
Registered User
Posts: 17
Joined: Thu Apr 21, 2005 12:56 am

Re: [BETA] PM Count MOD

Post by sibry »

I have now installed this!

It works a treat!!

Thanks very much 8)
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [BETA] PM Count MOD

Post by ErDrRon »

You're very welcome. Did you install version 1.0.0 or 1.1.0?

Cheers!
Ron
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [BETA] PM Count MOD

Post by ErDrRon »

Dogs and things wrote: It would be nice if you could make this MOD compatible with Admin Userlist 2.0.6c so that we can see in the userlist the nº of PMs.

Allthough I guess that the current memberlist thingie will do virtually the same, allow us to see in one quick look many user´s pm count. ;)
Dogs and things,

I have written an Add-on to the PM Count MOD that shows the number of PM's sent by each user to the Admin Userlist 2.0.6c MOD. It is included in the contrib folder of the latest PM Count MOD release (1.1.1).

Let me know if this serves your purpose.

Cheers!
Ron
:D
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] PM Count MOD

Post by Dogs and things »

It´s working, nicely. :razz:

I guess it would be to much of a deviation from the purpose of the MOD asking you to make the admin_userlist addon so that pm count would be fitted into the sorting method, but nevertheless I ask if this would be easilly achievable?

Your MOD is very good as it is really, but it would be nice to have some way of figuring out easilly who are the top pm-ers without having to go through the whole member- or userlist.

Greetings and thanks again.
For phpBB2 support visit phpBB2refugees.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [BETA] PM Count MOD

Post by ErDrRon »

I have added the Admin Userlist Add-on sorting capability you asked for and it is now included in version 1.1.1.

The following code snippet adds the sorting capability you asked for.

Cheers!
Ron
:D

Code: Select all

# 
#-----[ OPEN ]-------------------------------------------- 
# 
admin_userlist.php

#-----[ FIND ]-------------------------------------------- 
#
# approximately line 112
#
	case 'user_posts': 

# 
#-----[ AFTER, ADD ]--------------------------------------
#
// PM Count MOD - Start
	case 'user_pms':
// PM Count MOD - End		

#-----[ FIND ]-------------------------------------------- 
#
# approximately line 839
#
			  $select_sort_by_text = array($lang['User_id'], $lang['Active'], $lang['Username'], $lang['Joined'], $lang['Last_activity'], $lang['User_level'], $lang['Posts'], $lang['Rank'], $lang['Email'], $lang['Website']); 

# 
#-----[ REPLACE WITH ]--------------------------------------
#
// PM Count MOD - Start
			  $select_sort_by_text = array($lang['User_id'], $lang['Active'], $lang['Username'], $lang['Joined'], $lang['Last_activity'], $lang['User_level'], $lang['Posts'], $lang['Pms'], $lang['Rank'], $lang['Email'], $lang['Website']); 
// PM Count MOD - End
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] PM Count MOD

Post by Dogs and things »

Thanks for your impressive quickness!

I have some minor bad news though:

My admin_userlist is not exactly the same as the pre-edited one you include. In mine I can´t find the first find of the snippet,

Code: Select all

   case 'user_posts':
The second find is there allright, just like the others in your first version of this addon.

Here is my admin_userlist.php for you to compare. A bit strange really. I´m sure my file is the correct version from admin userlist MOD version 2.0.6c, I just compared the file I´m using with a fresh one from the MOD as I downloaded it.
For phpBB2 support visit phpBB2refugees.
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Re: [BETA] PM Count MOD

Post by ErDrRon »

It looks like you've added another MOD to the Admin Userlist MOD. The following code has replaced the standard code in your version:

Code: Select all

//
// sort method (MOD: save sort order)
//
if ( isset($HTTP_GET_VARS['sort']) || isset($HTTP_POST_VARS['sort']) )
{
   $sort = ( isset($HTTP_POST_VARS['sort']) ) ? htmlspecialchars($HTTP_POST_VARS['sort']) : htmlspecialchars($HTTP_GET_VARS['sort']);
   $sort = str_replace("\'", "''", $sort);
  $order = ( isset($HTTP_POST_VARS['order']) ) ? $HTTP_POST_VARS['order'] : $HTTP_GET_VARS['order'];

   $order = ($order == 'ASC') ? 1 : 0;

   $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$sort' WHERE config_name = 'admin_user_mode'";
   if (!($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Could not update sort method', '', __LINE__, __FILE__, $sql);
   }

   $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = $order WHERE config_name = 'admin_user_order'";
   if (!($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Could not update sort order', '', __LINE__, __FILE__, $sql);
   }
}
$sort = isset($sort) ? $sort : $board_config['admin_user_mode'];
$sort_order = ((isset($order) ? $order : $board_config['admin_user_order']) == 1) ? 'ASC' : 'DESC';
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] PM Count MOD

Post by Dogs and things »

Hello Ron,

You´re right, of course, I added some sort order modification to the userlist.

I undid the changes made by that addon and installed yours. It works nicely.

Thanks again for helping me out.

I´ll try and sort out that sort order tomorrow, if I can.

For now I´m quite pleased with the new function you added, it´s much more usefull than that sort order thing.

Final question, feel free to not answer: Would you expect this filter addon to interfere with yours or should I just try and see what happens? :razz:

Greetings.
For phpBB2 support visit phpBB2refugees.
Post Reply

Return to “[2.0.x] MODs in Development”