View Full Version : Private Messages Enhancements - PM Block by BOP5 (Private Message Block Lists per User)
BirdOPrey5
06-20-2011, 10:00 PM
Updated to Version 1.1 - NO FILE EDITS REQUIRED!!
This mod allows your users to setup their own personal private message block lists. No one on their lists will be allowed to PM them. (You can optionally specify immune usergroups such as admins and mods that can't be blocked.)
You can also optionally enable 2-way blocking so if one user adds someone to their block list they can not PM that user either. (Recommended)
This mod requires you to create 1 multi-line user profile field via your Admin CP. Detailed instructions for doing so are included in the installation instructions in the .zip.
LIMITATIONS OF THIS MOD:
If a user changes usernames the block list will need to be updated with the new username.
Notes:
When adding a username to the block list capitalization of the letters do not count but all other punctuation such as spaces DO count.
This mod adds 2 phrases in Error Messages:
pm_blocked - This is the error shown when a user has been put on the recipients block list.
pm_denied - This is the error shown when 2-way blocking is enabled and a user tries to PM a recipient on their own block list.
Current Version: 1.1 - Minor bugfix
1.0 - No file edits required!
0.9 - Stable Beta / Initial Release
This has been tested on 3.8.7, 4.0.8, and 4.1.2 and is expected to work on all 3.7/8, 4.0/1 versions.
BirdOPrey5
06-21-2011, 04:08 PM
Reserved.
Braders
06-24-2011, 02:04 PM
Just what the doctor ordered, well in my case a few members and coincidentally they only started bugging me about it today. So thanks for this!
Installation and instructions followed to the letter and all appears to be in order.
I'll just await my members feedback.
Thanks again.
imedic
06-28-2011, 05:43 AM
Should be VB default setting ... Great mod, many thanks.
Unfortunately upon testing I have received this error when trying to send PM to a blocked user: Warning: Invalid argument supplied for foreach() in [path]/private.php on line 1187 and the MP pass trough.
Putting a moderator on ignore list is possible and you cannot send him a message (your mod is working). You receive the normal error message you set.
I have added registered users to Immune group ( your mod work for moderators set in immune group) but messages still pass trough and above error is shown for this users.
Additional testing: if a moderator is ignoring a user, if user try to send him a message will pass trough.
I installed it on a vb 3.8.5 and I have another PM enhancement (pop up private message). among other mods.
BirdOPrey5
06-28-2011, 10:55 AM
Should be VB default setting ... Great mod, many thanks.
Unfortunately upon testing I have received this error when trying to send email to a blocked user: and the MP pass trough.
Putting a moderator on ignore list is possible and you cannot send him a message (your mod is working). You receive the normal error message you set.
I have added registered users to Immune group ( your mod work for moderators set in immune group) but messages still pass trough and above error is shown for this users.
Additional testing: if a moderator is ignoring a user, if user try to send him a message will pass trough.
I installed it on a vb 3.5 and I have another PM enhancement (pop up private message). among other mods.
Can you confirm you are saying you got this error when trying to send an email to a blocked user? :confused: What were using to send the email? This mod shouldn't affect emails at all.
I really couldn't test this on vb 3.5 either so that might be part of the issue. I was able to test on 3.8 and 4.0 and there are no errors in normal operation of the mod.
imedic
06-28-2011, 02:05 PM
Ups sorry I went to sleep very late:
I am receiving errors when trying to send PM's and forum is 3.8.5 (not the last version 3.8.7) not 3.5 ....
And mod is great as I just had an issue with a user reporting abusive PM's. Any help would be great.
I double check edit of the file and is done ok.
BirdOPrey5
06-28-2011, 03:06 PM
Can you PM me a partial copy of your private.php file, starting 10 lines or so before the edit and going to 10 lines or so after the edit?
BirdOPrey5
06-28-2011, 04:26 PM
The issue with imedic was the file edit in the wrong spot.
Please be careful when making your file edit- it needs to be below $pmdm->pre_save(); , not just the first hook:
($hook = vBulletinHook::fetch_hook('private_insertpm_proces s')) ? eval($hook) : false;
$pmdm->pre_save();
borbole
06-28-2011, 04:55 PM
I have noticed that you have created several very nice mods BirdOPrey5. Keep up the good work :)
BirdOPrey5
06-28-2011, 05:02 PM
Thanks borbole... I hope one day you start releasing more again too... There were several of yours I installed and/or tagged. :up:
borbole
06-28-2011, 05:11 PM
Thanks borbole... I hope one day you start releasing more again too... There were several of yours I installed and/or tagged. :up:
Atm I don't have much free time like I used to. Hopefully later.
BirdOPrey5
06-28-2011, 05:13 PM
Hey all... I just noticed that this is indeed possible without a file edit. I am working on an updated version now.
BirdOPrey5
06-28-2011, 05:45 PM
Updated to 1.0- I moved the exact code into a hook and only had to add 1 line.
No file edits required. Not sure why I couldn't see the solution when I first released it. Must have been a long day. :)
Please remove the file edit if you are upgrading from version 0.9.
New installations will require no edits at all.
imedic
06-28-2011, 06:13 PM
Incredible support, dumb user (me) :D
I have made the change and is better. Sorry , it seems is not my day to make code edits. :(
I am receiving same error (line 1189) when I try to send an PM to a user that is on my ignore list. And I have set 2 way blocking.
Also if I put a moderator in the ignore list I cant send PM to him but this is not major problem because moderators can always send PM even if I have set them on ignore list.
Mode is blocking as it should suppose to do an user that is on ignore list. :)
I have updated the file so you can re download from link i sent to you on PM and check if something is wrong.
imedic
06-28-2011, 06:14 PM
Uau , that is fast. It seems we have (both) blind spots :D Will upgrade now ... I will come back.
I recieve new error when I try to send PM to a user that is on my ignore list: Warning: Invalid argument supplied for foreach() in [path]/private.php(1177) : eval()'d code on line 63
I am also having this error only on splash redirect screen then I come back to PM page.
The PM is not going to the user. That user is blocked to send me PM (working fine for main idea of this mod).
Weird, this error appear only with one user (clone for testing purposes) and is not appearing to other accounts.... I have not found a pattern.....
BirdOPrey5
06-28-2011, 06:17 PM
Uau , that is fast. It seems we have (both) blind spots :D Will upgrade now ... I will come back.
Please let me know how the new version works.
imedic
06-29-2011, 08:07 AM
Uau , that is fast. It seems we have (both) blind spots :D Will upgrade now ... I will come back.
I recieve new error when I try to send PM to a user that is on my ignore list: Warning: Invalid argument supplied for foreach() in [path]/private.php(1177) : eval()'d code on line 63
I am also having this error only on splash redirect screen then I come back to PM page.
The PM is not going to the user. That user is blocked to send me PM (working fine for main idea of this mod).
Weird, this error appear only with one user (clone for testing purposes) and is not appearing to other accounts.... I have not found a pattern.....
That is after testing. I still don't get it why it is behaving like this for just this user. I have tested with other users from same group.
Many thanks :)
BirdOPrey5
06-29-2011, 10:17 AM
Does the username have any special characters in it?
imedic
07-04-2011, 08:07 PM
No, is a small one: drn
BirdOPrey5
07-04-2011, 08:22 PM
If yo want PM me the username and I'll test it on my forum.
BirdOPrey5
07-06-2011, 09:33 AM
No, is a small one: drn
Sorry guess our posts must have crossed.
I was not able to reproduce the error even using drn as a username however I have added code that should prevent the error you received even though I can't imagine how it happened.
Mod updated to version 1.1- Please upgrade and see if you still get the error.
imedic
07-06-2011, 12:48 PM
Error is gone and message is not going to the ignored user.
But I am not receiving the note from you stating that you cant send PM to a ignored user at all. I just come back to PM screen.
For other users is working.
Is strange behaviour, I guess I need to reupload some files back to server because I have other 2 strange behaviours on forum that I cant solve.
The ignored user is receiving the not is ignored and cant send PM back.
For now is great. Working :)
Thanks for so prompt response. I nominate the mod as it should be part of the privacy pack settings in Vb.
BirdOPrey5
07-06-2011, 12:50 PM
When you say 'ignored user' do you mean the vbulletin ignore list or the block list for this mod?
imedic
07-06-2011, 01:06 PM
Block list of mod
Max Taxable
08-27-2011, 10:58 PM
Missed this before. Got it now.
Nicely done, BOP5.
I think it would be easier if the blocked users table uses userid instead of username sinces even if a user changes his username, userid is never changed.
I imagine several ways of doing that.
The simpler one is adding an extra option in the "Buddy List" when you visit the other user's profile
You can add the same script in postbit or when receiving a PM.
Other one involves using the same javascript that VB uses to recognize PM's destinations so to fill the blocked PM's table.
I'm not an expert in PHP or Javascript, but I think this would spare everyone lots of headaches when a user changes the username, or blocking the wrong user.
Great mod !!
DEGE
BirdOPrey5
08-28-2011, 06:02 PM
I think it would be easier if the blocked users table uses userid instead of username sinces even if a user changes his username, userid is never changed.
I imagine several ways of doing that.
The simpler one is adding an extra option in the "Buddy List" when you visit the other user's profile
You can add the same script in postbit or when receiving a PM.
Other one involves using the same javascript that VB uses to recognize PM's destinations so to fill the blocked PM's table.
I'm not an expert in PHP or Javascript, but I think this would spare everyone lots of headaches when a user changes the username, or blocking the wrong user.
Great mod !!
DEGE
Thanks for the suggestions. Please "Mark as Installed" if you're using this. :up:
d0zer
12-09-2011, 07:52 PM
a member of a ban on the control panel option does not seem
BirdOPrey5
12-11-2011, 02:13 PM
a member of a ban on the control panel option does not seem
I don't understand these words. :confused:
vijayninel
12-16-2011, 12:16 PM
Thanks. :) it would be nice if we can block people from visitors messages as well.
d0zer
12-18-2011, 04:56 PM
I installed the plugin it doesn't work I don't see anything in control panel
Max Taxable
12-18-2011, 07:11 PM
I installed the plugin it doesn't work I don't see anything in control panelAdminCP>vBulletin Options>PM Block List by BOP5
It does work.
BirdOPrey5
12-19-2011, 11:43 AM
I installed the plugin it doesn't work I don't see anything in control panel
If you don't see the options then uninstall it and try again. If it still doesn't work you have a bigger problem with your forum then this mod- try installing another mod and see if you can find its options.
Max Taxable
10-10-2013, 10:18 PM
I've been using this on my 3.8.7 for a couple of years now. My members really like it and it works without flaw.
devil78
04-14-2014, 06:41 PM
This add-on Tapatalk does not work.
So while it would be nice in Tapatalk.
tbworld
04-14-2014, 07:10 PM
This add-on Tapatalk does not work.
So while it would be nice in Tapatalk.
Many modifications will not work with 'Tapatalk', it depends on where the API intersects the code. This is where vb5 will shine in the long run. :)
BirdOPrey5
04-15-2014, 12:37 AM
This add-on Tapatalk does not work.
So while it would be nice in Tapatalk.
You would need to ask tapatalk to implement the hooks used by this modification.
devil78
04-15-2014, 02:32 PM
Many modifications will not work with 'Tapatalk', it depends on where the API intersects the code. This is where vb5 will shine in the long run. :)
You would need to ask tapatalk to implement the hooks used by this modification.
Yes Most add-ons are incompatible with tapatalk.
BirdOPrey5
11-03-2014, 08:55 PM
FYI,
I was able to enable this in the latest version of Tapatalk for VB 3.x be editing the /functions/get_pm_stat.php Tapatalk file.
Right before the code:
$pmdm->pre_save();
Around line 736
I added the line
($hook = vBulletinHook::fetch_hook('private_insertpm_proces s')) ? eval($hook) : false;
So the code around it looks like:
$pmdm->set('fromuserid', $vbulletin->userinfo['userid']);
$pmdm->set('fromusername', $vbulletin->userinfo['username']);
$pmdm->setr('title', $pm['title']);
$pmdm->set_recipients($pm['recipients'], $permissions, 'cc');
$pmdm->set_recipients($pm['bccrecipients'], $permissions, 'bcc');
$pmdm->setr('message', $pm['message']);
$pmdm->setr('iconid', $pm['iconid']);
$pmdm->set('dateline', TIMENOW);
$pmdm->setr('showsignature', $pm['signature']);
$pmdm->set('allowsmilie', $pm['disablesmilies'] ? 0 : 1);
if (!$pm['forward'])
{
$pmdm->set_info('parentpmid', $pm['pmid']);
}
$pmdm->set_info('replypmid', $pm['pmid']);
($hook = vBulletinHook::fetch_hook('private_insertpm_proces s')) ? eval($hook) : false;
$pmdm->pre_save();
Seems to work so far in my limited testing.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.