PDA

View Full Version : Private Messages Enhancements - Force Users to Read PMs by BOP5 (VB4/VB3)


BirdOPrey5
07-22-2012, 10:00 PM
Brought to you by BirdOPrey5
www.Qapla.com (http://www.qapla.com/mods/)

This is a fairly simple mod to allow Admins to force users (by usergroup) to make sure they have read all their PMs before they are allowed to use/browse the forums.

Version 1.1

1.0 - Initial Release (on Qapla.com)
1.1 - Added username to the error message

Note: In the VB4 Publishing Suite there is no way to prevent users from browsing or using the CMS system due to the lack of the required hook in these areas.

Demo: You must register at www.Qapla.com/mods/

Then go to Permission Groups in Settings.

Join the "Force Reading PMs Demo" Group.

Now either send yourself a PM, or if you already have an unread PM try to access a forum or a thread or blog or profile- you will be blocked by the mod. You can also try to "Mark as Read" some PMs via the checkboxes without opening them- you will see that has been blocked too.

You can leave the group again by going to the same page when you're done testing.


You can customize the message by editing the Error Message Phrase: bop5_force_read_pm_message

Thinking about this further, this could be a great way of fighting spam. I'm sure none of the current spam bots out there bother reading any PMs, and if you set your forum to send a welcome PM, every new user will get at least 1 PM. If the spam bot doesn't check them they will never be allowed to post anything. Talk about unintended consequences.

Please "Mark as Installed" if you use this. :)
Donations Always Appreciated. :up:

BirdOPrey5
07-23-2012, 02:33 PM
Reserved.

ForceHSS
07-24-2012, 02:12 AM
Has it been tested on the latest vb version?

CharlieDelta
07-24-2012, 02:50 AM
Having the ability to force specific users would make this perfect.
Any possibility?

Works great on 4.2.

Mikelito
07-24-2012, 08:00 AM
why in forumhome not work?

BirdOPrey5
07-24-2012, 11:01 AM
Has it been tested on the latest vb version?

Yes, my demo site is 4.2.0 and it works fine on it.

why in forumhome not work?

Because the "THIS_SCRIPT" name of forumhome is: index

BirdOPrey5
07-24-2012, 11:06 AM
Having the ability to force specific users would make this perfect.
Any possibility?

Works great on 4.2.

The best way to do this would be to create a new usergroup "Force Read PMs" and then add it to specific users as an "additional" (secondary) usergroup and it will force those users to read their PMs.

ForceHSS
07-24-2012, 12:15 PM
Cool installed

Trek
07-24-2012, 05:15 PM
Sounds cool.

One suggestion for a feature:

Set a userID (such as user 1) that any PMs from that user are forced to be read. That way, they are only forced to read PMs from specific users, not all users.

BirdOPrey5
07-24-2012, 08:00 PM
That would need a lot of custom coding Trek. We'll see...

Trek
07-24-2012, 08:51 PM
That would need a lot of custom coding Trek. We'll see...

Fair enough, I have no idea the work involved. =)

BirdOPrey5
07-24-2012, 09:52 PM
Well for an overview, the fact there is any unread PMs is part of the $vbulletin array and therefore accessible on every singe page of vBulletin without any custom queries or coding needed.

On the other hand to see if there are any unread PMs from specific users would require coding a "global" plugin (on that runs on every page) that requires at least one query of the database return the userids of all unread PMs in the user's PM Storage, and then decide to show a message or not depending on if any of the userids returned match a list of userids stored in settings.

It isn't very difficult work but a lot more involved relatively then the simple 1 line more or less in the current mod: if ($vbulletin->userinfo['pmunread'] > 0) that does the majority of the work.

So it's something I might get to if I find myself bored with a couple hours to spare- but it's been a while since I've been bored like that. ;)

If anyone else wants to try, feel free to release your own version with this option.

DirtRider
01-04-2013, 05:19 PM
Nice mod, would it be possible for it to also include members with post count = X amount of post. The way I have my usergroups setup I would only want it to tag members with 5 or less post

BirdOPrey5
01-12-2013, 02:39 PM
yes that would be possible... will take a little time though... still recovering.

Menno11
04-14-2013, 02:19 PM
works great on vb 4.2.0 p3

Thx Bird

b65ran
04-30-2013, 12:48 AM
I have question here. Lets say I enable this feature for Group X. Would they be forced to read PMs sent by anyone, or its when an admin sends a PM ?

BirdOPrey5
05-12-2013, 08:56 AM
They would have to read ALL PMs, from anyone.

ZeroDoom
08-20-2014, 01:14 PM
I can't believe I didn't see this. Worked for v4.2.2, thank you very much!

tagline
03-09-2015, 10:25 AM
Great plugin, but I've disabled (non uninstalled) because I was searching something little bit different. In other words, force user to read only Admin PM's