Version: 1.00, by Gary King
Developer Last Online: Jun 2020
Version: 2.3.x
Rating:
Released: 05-21-2003
Last Update: Never
Installs: 12
No support by the author.
Minimum Posts Per Day to View Specified Forums
What does this hack do?
It allows you to specify the minimum posts per day that a user must have, in order to view specified forum(s). This is especially useful, if you want only active users to view a specified forum, and disable access to those forums from less active users.
How do I install this hack?
Simply follow the attached instructions.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
// if posts per day is less than specified, then do not allow to view forum/sub-forum
$jointime = (time() - $userinfo[joindate]) / 86400; // Days Joined
if ($jointime < 1) { // User has been a member for less than one day.
$postsperday = $bbuserinfo[posts];
} else {
$postsperday = sprintf("%.2f",($userinfo[posts] / $jointime));
}
if (($foruminfo[minpostsperday]>$postsperday) and !(ismoderator($foruminfo[forumid]))) {
eval("standarderror(\"".gettemplate("error_minpostsperday")."\");");
exit;
}
With
PHP Code:
// if posts per day is less than specified, then do not allow to view forum/sub-forum
$jointime = (time() - $bbuserinfo[joindate]) / 86400; // Days Joined
if ($jointime < 1) { // User has been a member for less than one day.
$postsperday = $bbuserinfo[posts];
} else {
$postsperday = sprintf("%.2f",($bbuserinfo[posts] / $jointime));
}
if ($foruminfo[minpostsperday]>$postsperday) {
eval("standarderror(\"".gettemplate("error_minpostsperday")."\");");
exit;
}
If you have 3 forums set up. You set each forum to a minimum 1 post, your post only counts for one of the forums, as if you're paying a toll to get in. So with your one post you have access to one of the three forums, although you're going to have to post another 2 to get in to the other 2 forums. That might be your problem, you'd like it to work in the way that 1 post grants you access to all forums with a 1 post minimum. I hope that makes sence.
Today at 02:19 PM kamu said this in Post #18 If you have 3 forums set up. You set each forum to a minimum 1 post, your post only counts for one of the forums, as if you're paying a toll to get in. So with your one post you have access to one of the three forums, although you're going to have to post another 2 to get in to the other 2 forums. That might be your problem, you'd like it to work in the way that 1 post grants you access to all forums with a 1 post minimum. I hope that makes sence.
This is in reply to insanctus.
If you have 1 post per day, and if all forums require at least 1 post per day to view them, then you WILL be able to view them all.
Although, the problem here would be that it would be impossible to get that initial post then