Minimum posts modification

Since Opentools.de has now gone away I've created this forum to house FAQs and support for this mod in phpBB2.

Moderator: Experts

Locked
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Minimum posts modification

Post 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.
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: Minimum posts modification

Post 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)
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Minimum posts modification

Post 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.
rompingdonkey
Posts: 2
Joined: Sun Feb 08, 2009 1:11 pm
Location: UK

Re: Minimum posts modification

Post 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
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Minimum posts modification

Post 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.
rompingdonkey
Posts: 2
Joined: Sun Feb 08, 2009 1:11 pm
Location: UK

Re: Minimum posts modification

Post by rompingdonkey »

OK David and thanks for the reply..

Stu
Locked