Private messages limits for new users
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexHelp
Author Message
Aforo
I18N / L10N Lead Dev


Joined: Dec 27, 2007
Posts: 146

PostPost subject: Private messages limits for new users
Posted: Fri Jan 09, 2009 2:41 pm
Reply with quote

I didn't find this subject in other topic.

I need block private messages for new users until they have a limit of messages (for example 10 messages).

¿cpg-forum hasn't this option?

Any idea?

_________________
Aforo - Google Earth - WebNaranja - DFcms.es

Aforo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2
Back to top
View user's profile Visit poster's website
layingback
Forum Admin


Joined: Apr 19, 2004
Posts: 953

PostPost subject: Re: Private messages limits for new users
Posted: Fri Jan 09, 2009 5:06 pm
Reply with quote

Maybe a feature request for Forum Plus?
_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website
Aforo
I18N / L10N Lead Dev


Joined: Dec 27, 2007
Posts: 146

PostPost subject: Re: Private messages limits for new users
Posted: Sun Jan 11, 2009 12:52 pm
Reply with quote

Thank you, Layingback.

I think that can be useful. It's easy to do and is a good way for avoiding that new users can SPAM, without writting in the forum or new users go directly to ask to moderators.

If Admin is not interested in this feature, he can put to "0" this variable, and if is interested can put a "barrier" before using PM.

Allways thinking in spammers problem.

_________________
Aforo - Google Earth - WebNaranja - DFcms.es

Aforo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2
Back to top
View user's profile Visit poster's website
Aforo
I18N / L10N Lead Dev


Joined: Dec 27, 2007
Posts: 146

PostPost subject: Re: Private messages limits for new users
Posted: Tue Jan 20, 2009 6:28 pm
Reply with quote

Provisional solution has been this one:

Edit the file: modules/Private_Messages/index.php

Insert only red lines:

Quote:
//
// Has admin prevented user from sending PM's?
//
if ( !$userdata['user_allow_pm'] && $mode != 'edit' ) {
$message = $lang['Cannot_send_privmsg'];
message_die(GENERAL_MESSAGE, $message);
}
//
// Prevencion de Privado a usuarios con menos de $limit Mensajes en el foro
// Prevent sending PM's of user withe less than $limit Forum Messages
$limit=5; // Minimun Number of Messages in Forum for using Private Messages
if ( $userdata['user_posts'] < $limit && $mode == 'post' ) {
$message = $lang['Cannot_send_privmsg']."<br />No está permitido enviar <b>Mensajes Privados</b> a Usuarios con menos de <b>$limit Mensajes</b>. Envía tus consultas al Foro.<br />Is Not Allowed sending <b>Private Messages</b> to users with less than <b>$limit Messages</b> in the Forum. Send your questions to the Forum.";
message_die(GENERAL_MESSAGE, $message);
}

//
// Start output, first preview, then errors then post form
//


New users can not init a conversation until they reach 5 messages in the forum, but they can replay.

After the first 5

_________________
Aforo - Google Earth - WebNaranja - DFcms.es

Aforo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Centos 5/Apache 2.2.3/MySQL:5.0.45/PHP:5.2.10 /9.2
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexHelp All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.7553 seconds with 19 DB Queries in 0.233 seconds
Memory Usage: 2.88 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy