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

Minimum posts modification

Post by DavidIQ » 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:

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 » Fri Apr 11, 2008 5:37 am

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)

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Minimum posts modification

Post by DavidIQ » Fri Apr 11, 2008 11:17 am

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 » Sun Feb 08, 2009 1:15 pm

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

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: Minimum posts modification

Post by DavidIQ » Sun Feb 08, 2009 8:59 pm

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 » Tue Feb 10, 2009 6:49 am

OK David and thanks for the reply..

Stu

Locked