Page 1 of 1

Minimum posts modification

Posted: Thu Jan 25, 2007 11:27 am
by DavidIQ
If you want attachment mod to only allow users who have reached a certain amount of posts to download then do the following:

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");
}
Change the $minposts to whatever value you want to be the minimum and that's all.

Re: Minimum posts modification

Posted: Fri Apr 11, 2008 5:37 am
by streamino
Shall we choose any forum for adding this code.Because i wanted to open and add this code some of them but i cant wanted to add this code at all my forum.Could we edit this mod at our admin panel .(forum permissons panel.etc)

Re: Minimum posts modification

Posted: Fri Apr 11, 2008 11:17 am
by DavidIQ
This was a quick throw-together modification so if you want to change the number of posts required you'd need to edit the page. I have no plans to make this configurable through the admin panel. As for making this only the case for certain forums then you'll need to also hard-code that since there is no data model in place to exclude certain forums from this.

Re: Minimum posts modification

Posted: Sun Feb 08, 2009 1:15 pm
by rompingdonkey
Hi.

Could you tell me if this could be used in a "sale section" please? We have got a Sales Section in our Forum and wanted to make it so 30 posts had to be made before they could post in the section..

Thanks
Stu

Re: Minimum posts modification

Posted: Sun Feb 08, 2009 8:59 pm
by DavidIQ
This particular MOD is only for the attachment MOD. If this is something you want done to phpBB3 you should visit the phpbb.com site when it comes back up and post in the MOD requests forum or check to see if there's a MOD already available for that.

Re: Minimum posts modification

Posted: Tue Feb 10, 2009 6:49 am
by rompingdonkey
OK David and thanks for the reply..

Stu