Minimum posts modification
Posted: Thu Jan 25, 2007 11:27 am
If you want attachment mod to only allow users who have reached a certain amount of posts to download then do the following:
Change the $minposts to whatever value you want to be the minimum and that's all.
Code: Select all
#
# -----[ OPEN ]-----
download.php
#
# -----[ FIND ]-----
#
if ($attach_config['disable_mod'] && $userdata['user_level'] != ADMIN)
{
message_die(GENERAL_MESSAGE, $lang['Attachment_feature_disabled']);
}
#
# -----[ AFTER, ADD ] -----
#
$minposts = 30;
if ($userdata['user_posts'] < $minposts && $userdata['user_level'] != ADMIN)
{
message_die(GENERAL_MESSAGE, "You need to make " . $minposts . " posts before you are able to download files");
}