[MODDB] PM Blocking by Users

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!
Suggested Hosts
Locked
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

[MODDB] PM Blocking by Users

Post by mtrs » Mon Feb 16, 2009 11:06 pm

Modification Name: PM Blocking by Users
Author: mtrs

Modification Description: Adds two UCP modules to let users block private messages from users in their PM blacklist with the option of entering blocking reasons for each user. Also provides the PM whitelist feature to allow receiving private messages only from the users in PM whitelist. Gives the ability to administrators blocking some users sending PMs to some others by entering at ACP users overview page. It can also prevent receiving PMs from foes.

Modification Version: 1.0.0-RC7

Modification Download: PM Blocking by Users


Features:
  • PM black list blocking
    • Users can enter different denial reasons per PM blocked users, at most 60 chars can be entered.
      Your are not allowed to send private mesages to this user since it is forbidden by USER1 with the reason: "dddddddddddddddddddddddddddddd ggggggggggggggggggggggggggg.."
    • PM whitelist to allow private messages only from certain users
    • If PM whitelist and PM blacklist are empty allows receiving private messages from anyone
  • Administrators can enter a different user-to-user PM blockage list (max 255 chars)
  • Administrators and moderators are not affected
  • Adding custom block reason to user log
  • User permission to use pm blacklist-whitelist module
  • Administrator can block private messages from foes at ACP
  • subsilver2 support

Edit: 18.02.2009 - Version 0-0-2
  • Fix bug of preventing PM users add
Edit: 25.02.2009 - Version 0-0-3
  • Bug fix SQL entry
Edit: 18.03.2009 - Version 0-0-4
  • Foe PM blockage added
  • Admin and moderators are not affected
  • Mod name change
Edit: 19.03.2009 - Version 0-0-5
  • UCP PM Foe module added - (copy of foe module)
Edit: 25.03.2009 - Version 0-0-6
  • PM Foe block reason entry option by user added
Edit: 2008-03-28 - Version 0.0.7
  • PM Foe reason by user log added
  • subsilver2 support
  • Codes moved into a function
Edit: 2008-06-30 - Version 0.0.8
  • PM Friend support
  • UMIL install script added
  • User permission added to use pm foe-friend module at UCP
  • Bug fix: pm foe can be addded to pm if pm foe in friend list
Edit: 2008-07-01 - Version 0.0.9
  • Bug fix in UMIL install script added
[/list][/size]
Last edited by mtrs on Sun Jan 10, 2010 10:02 am, edited 32 times in total.
I abandoned all of my mods.

Kharon
Registered User
Posts: 235
Joined: Thu Oct 26, 2006 5:27 pm

Re: [BETA] User to user PM blocking by Admin (0.0.2)

Post by Kharon » Sun Feb 22, 2009 1:59 pm

very nice mod :)

thank you
--------------

trigger_error('PM_USERS_REMOVED_NO_PM'); kısmını bizim dil dosyasından belirleyebileceğimiz bir şekilde düzenlenemez mi ? ayrıca ucp den yönetim eklense ?

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] User to user PM blocking by Admin (0.0.2)

Post by mtrs » Sun Feb 22, 2009 5:01 pm

Kharon wrote:very nice mod :)

thank you
Thanks for the comments..
I sometimes notice people close their PM receive option all, because of a few other users, so this mod can help instead of closing PM receive all.
Kharon wrote:--------------

trigger_error('PM_USERS_REMOVED_NO_PM'); kısmını bizim dil dosyasından belirleyebileceğimiz bir şekilde düzenlenemez mi ? ayrıca ucp den yönetim eklense ?
You're asking if we can use another language string and UCP control by user. It is easy to add another language variable (language/en/ucp.php), but, UCP entry options needs a few new functions to update the NO_PM_FROM list. Because, currently I keep no_pm_to list in users table, thus obtaining the not_pm_to is easy in ucp_pm_compose.php with $user->data['......'] , but updating another user's no_pm_to list is difficult.
I abandoned all of my mods.

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] User to user PM blocking by Admin (0.0.3)

Post by mtrs » Wed Feb 25, 2009 12:17 am

Mod updated to version 0.0.3
There is only a bug fix for sql entry.

To update, you should make the database entry default NULL, or run sql code below

Code: Select all

 ALTER TABLE `phpbb_users` CHANGE `user_no_pms_to` `user_no_pms_to` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL  
This is important for anyone using previous version(at most 10 user), because this bug prevents new user registrations to board. I've just noticed after seven days of no registrations to my board.
I abandoned all of my mods.

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [BETA] User to user PM blocking by Admin (0.0.3)

Post by lugsciath » Thu Feb 26, 2009 5:04 pm

German language file ;)

/language/de/mods/info_acp_pm_block.php

Code: Select all

*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//

// Adding the permissions
$lang = array_merge($lang, array(
		'USER_NO_PMS_TO'				=> 'Darf keine PM abesenden',
		'USER_NO_PMS_TO_EXPLAIN'		=> 'Dieser Benutzer kann keine PM zu diesen User ID senden. Trenne diese mit einem Komma, falls mehr als ein User Besp.: 53,56',
));

?>

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] PM Blocking from Foes and Users (0.0.4)

Post by mtrs » Wed Mar 18, 2009 9:18 pm

Mod updated to 0.0.4
lugsciath wrote:German language file ;)

/language/de/mods/info_acp_pm_block.php
Thanks for translation, but mod updated and have a few more lines to be translated now. When you translate all, I can add to mod package.
Kharon wrote: trigger_error('PM_USERS_REMOVED_NO_PM'); kısmını bizim dil dosyasından belirleyebileceğimiz bir şekilde düzenlenemez mi ? ayrıca ucp den yönetim eklense ?
in 0.0.4, I added different language entries, so you can change the PM blockage error messages. Also, foes are blocked to send PM now, so, we can consider that, a kind of UCP control to block PM from some certain users.
I abandoned all of my mods.

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [BETA] PM Blocking from Foes and Users (0.0.4)

Post by DoYouSpeakWak » Thu Mar 19, 2009 9:34 am

This is very nice. We been looking for something like this for a while. A ucp control would be good, would minimize the admin work
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] PM Blocking from Foes and Users (0.0.4)

Post by mtrs » Thu Mar 19, 2009 9:40 am

There are two independent PM block mechanism.
- Admin can block user-to-user PM by entering user_id at ACP
- User can add a user to foes, thus block pm from that user. Foes can't PM you.

I think, that can be considered enough like a UCP feature.
I abandoned all of my mods.

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [BETA] PM Blocking from Foes and Users (0.0.4)

Post by DoYouSpeakWak » Thu Mar 19, 2009 11:18 am

Thx again. i always love your mods. Every stone are ready to be turned. :)

Danish translation.
info_acp_pm_block.php

Code: Select all

<?php
/** 
*
* 
* @package Danish language translated by DYSW. 19/3/08 
* @version $Id: acp_no_pms_to.php,v 1.21 2009/02/16 12:53:34  Exp $
* @copyright (c) mtrs
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//

// Adding the permissions
$lang = array_merge($lang, array(
		'USER_NO_PMS_TO'				=> 'Ingen privat beskeder kan sendes',
		'USER_NO_PMS_TO_EXPLAIN'		=> 'Denne bruger kan ikke sende PMs til disse user_ids. Seperer med et komma hvis der er mere end en bruger. F.eks 53,56',
		'ENABLE_FOE_PM_BLOCKING'		=> 'Aktiver Fjende til bruger PM blokering',
));

?>
pm_block.php

Code: Select all

<?php
/**
*
* No Duplicate Gallery Avatar[Danish]
*
* @package Danish language translated by DYSW. 19/3/08 
* @version $Id: acp_no_pms_to.php,v 1.21 2009/02/16 12:53:34  Exp $
* @copyright (c) mtrs
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

/**
* DO NOT CHANGE
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}

// DEVELOPERS PLEASE NOTE
//
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
//
// Placeholders can now contain order information, e.g. instead of
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
// translators to re-order the output of data while ensuring it remains correct
//
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
// equally where a string contains only two placeholders which are used to wrap text
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
//
// Some characters you may want to copy&paste:
// ’ » “ ” …
//

// Begin : No Duplicate Gallery Avatar
$lang = array_merge($lang, array(
	'PM_RECEIVE_BLOCKED_FROM_FOES'		=> 'En eller flere brugere kunne ikke tilføjes til modtager listen pga. de er placeret i din fjende liste.',
	'PM_NOT_ALLOWED_TO_SOME_USERS'	=> 'Du kan ikke sende private beskeder til en eller flere brugere fordi du er på deres fjende liste.',
));
// End : No Duplicate Gallery Avatar

?>
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] PM Blocking by Users (0.0.5)

Post by mtrs » Thu Mar 19, 2009 9:20 pm

Mod updated to 0.0.5.
A separate UCP module added, thus users can block others. This is not related to Friends/Foe, but a new PM foe. At UCP, usernames added to a list (PM Foes) who cannot send PM to you.
I abandoned all of my mods.

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] PM Blocking by Users (0.0.6)

Post by mtrs » Wed Mar 25, 2009 11:17 am

Mod updated to 0.0.6
This feature added
    • Users can enter individual different reasons, at most 60 chars, to show PM blocked users. (0.0.6)
    • Your are not allowed to send private mesages to this user since it is forbidden by USER1 with the reason: "dddddddddddddddddddddddddddddd ggggggggggggggggggggggggggg.."
I abandoned all of my mods.

Kharon
Registered User
Posts: 235
Joined: Thu Oct 26, 2006 5:27 pm

Re: [BETA] PM Blocking by Users (0.0.6)

Post by Kharon » Wed Mar 25, 2009 9:28 pm

very nice mod :) thank you

User avatar
Alternativa
Registered User
Posts: 102
Joined: Mon Dec 01, 2008 5:26 pm
Location: Croatia
Contact:

Re: [BETA] PM Blocking by Users (0.0.6)

Post by Alternativa » Fri Mar 27, 2009 2:27 pm

Great mod.
Will this work with subsilver2 style?

mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: [BETA] PM Blocking by Users (0.0.6)

Post by mtrs » Fri Mar 27, 2009 3:19 pm

Alternativa wrote:Great mod.
Will this work with subsilver2 style?
Not at the moment, but I'll include subsilver2 edits in next update.
I abandoned all of my mods.

User avatar
Alternativa
Registered User
Posts: 102
Joined: Mon Dec 01, 2008 5:26 pm
Location: Croatia
Contact:

Re: [BETA] PM Blocking by Users (0.0.6)

Post by Alternativa » Fri Mar 27, 2009 4:44 pm

Ok great.
I will wait with install until subsilver2 is supported.

I will upload translation in my language.

Locked

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