News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Force Read Pms

Started by vbgamer45, March 11, 2013, 09:55:35 AM

Previous topic - Next topic

vbgamer45

Link to the mod



[glow=black,2,300]Force Read Pms[/glow]
Developed by 4Kstore
For SMFSimple.com

SMF 2.0 - 2.0.X



[glow=black,2,300]El soporte oficial de los desarrolladores de nuestros mods lo encontraras en SMFSimple.com
Official Support in www.SmfSimple.com
[/glow]



[glow=black,2,300]Description:[/glow]
Force users to read PMs when they have more than X Unread Pms

[glow=black,2,300]Descripcion:[/glow]
Obliga a los usuarios a leer los Mensajes Privdaos cuando tenga mas de X sin leer



[glow=black,2,300]Features:[/glow]
Administration:
Enable - Disable the mod.
Minimum number of unread PMs to redirect
Excludes Groups


[glow=black,2,300]Caracteristicas:[/glow]
Administracion:
Habilitar - Deshabilitar el mod.
Minima cantidad de MP no leidos para redireccionar
Grupos Excluidos



[glow=black,2,300]Screnshoot | Capturas[/glow]



Language Support | Lenguajes Soportados
English & Spanish


Settings
Administration Center » Configuration » Modification Settings » Force Read Pms
index.php?action=admin;area=modsettings;sa=forcereadpm
Notes:
This Mod Uses Hooks.

License:
* This SMF modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Shambles

So simple yet so useful - thanks :)

One question, or possible enhancement: would you consider returning some kind of confirmation message when the configuration has been saved?

In Configuration > Modification Settings > Force Read PMs, currently when you click "save" no indication is given that the changes have been accepted.

Shambles

Doesn't appear to work (I have PM Informer installed). I'll play more when I get home from work to see if there's a conflict.


In the meantime, I'm getting huge quantities of errors.


Arantor

Ah, yes, I see what the problem is.

I really, really, really wish people would stop screwing around testing $user_info['groups'] by index, because as this example proves, $user_info['groups'][1] MAY NOT NECESSARILY EXIST. Guests don't have a post count group! So much bad advice around about this.

I'd suggest line 76 should probably be:

if (count(array_intersect($user_info['groups'], $exclude_groups)) == 0 && (($context['current_action'] != 'pm') || ($context['current_action'] == 'pm' && !empty($context['current_subaction']))) && !empty($modSettings['frp_min_mps']) && $user_info['unread_messages'] >= $modSettings['frp_min_mps'])
Holder of controversial views, all of which my own.


4Kstore

Thanks, the error was fixed, this mod is only for member, we need check that before sorry.
Mod updated, if you want do the fix manual just open and edit Sources/ForcereadPms.php file

Search:
if (!empty($modSettings['frp_enabled']))

Replace with:
if (!empty($modSettings['frp_enabled']) && !$user_info['is_guest'])

¡¡NEW MOD: Sparkles User Names!!!

Arantor

That still does not solve the bug that you have.

Let's say that admins are excluded from being forced to read PMs. In my forum admin is a secondary group but you're NOT CHECKING THAT. You're only checking the primary group and the post count group, not secondary groups.
Holder of controversial views, all of which my own.


4Kstore

Thank, you are right...
I just update the mod and learn something new :D

¡¡NEW MOD: Sparkles User Names!!!

Advertisement: