View Full Version : Can't PM before have x posts in the day
mastba
04-24-2008, 04:39 AM
Hello. I want hack prevent users send pm before x posts per day .
Can any one help me ?
Thanks for you
Lynne
04-24-2008, 02:59 PM
Search "posts" "All Mods" "Titles Only" and I find this: Can't Use Private Messages Before X posts (https://vborg.vbsupport.ru/showthread.php?t=155308&highlight=posts)
mastba
04-24-2008, 11:59 PM
thanks for you I have installed this hack but I want another
" user can't PM before X posts today and tomorrow can't PM before X posts tomorrow "
x = number of his post per day not total posts.
Thanks for you
mastba
05-20-2008, 04:16 AM
can any one help me ? :)
Our House
05-20-2008, 12:09 PM
You could modify the mod that Lynne linked (pretty sure that's allowed) so that it works the way you want it.
Incidentally, what constitutes "today"? Is it 12am - 12am the user's time, forum time, or server time?
mastba
06-11-2008, 10:16 PM
Hello
I edit this code
this is the result of my code ;)
$userid = $_SESSION[userid];
$today = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$userposts = $db->query_read("select postid from post where userid=\"$userid\" AND dateline > \"$today\" ");
$user_posts = $db->num_rows($userposts);
if ($user_posts < $vbulletin->options['devel_cant_pm_posts'])
{
// throw the error ...
standard_error(fetch_error('cantusepm', $vbulletin->options['devel_cant_pm_posts'], $userposts));
}
if any one can use and edit them please send to me what you are editing ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.