vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=265596

PM Block by BOP5 (Private Message Block Lists per User)
by BirdOPrey5
21 Jun 2011 17:07

5 Attachment(s)
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 21 Jun 2011 17:08

Reserved.

Braders 24 Jun 2011 15:04

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 28 Jun 2011 06:43

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:
Quote:

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 28 Jun 2011 11:55

Quote:

Originally Posted by imedic (Post 2213930)
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 28 Jun 2011 15:05

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 28 Jun 2011 16:06

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 28 Jun 2011 17:26

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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


borbole 28 Jun 2011 17:55

I have noticed that you have created several very nice mods BirdOPrey5. Keep up the good work :)

BirdOPrey5 28 Jun 2011 18:02

Thanks borbole... I hope one day you start releasing more again too... There were several of yours I installed and/or tagged. :up:

borbole 28 Jun 2011 18:11

Quote:

Originally Posted by BirdOPrey5 (Post 2214159)
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 28 Jun 2011 18:13

Hey all... I just noticed that this is indeed possible without a file edit. I am working on an updated version now.

BirdOPrey5 28 Jun 2011 18:45

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 28 Jun 2011 19:13

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 28 Jun 2011 19:14

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.....


All times are GMT. The time now is 14:01.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.