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

Minimum posts modification

Postby DavidIQ » Thu Jan 25, 2007 12:27 pm

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

Re: Minimum posts modification

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

Re: Minimum posts modification

Postby 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.
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Re: Minimum posts modification

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

Re: Minimum posts modification

Postby DavidIQ » Sun Feb 08, 2009 9: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.
User avatar
DavidIQ
 
Posts: 505
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth

Re: Minimum posts modification

Postby rompingdonkey » Tue Feb 10, 2009 7:49 am

OK David and thanks for the reply..

Stu
rompingdonkey
 
Posts: 2
Joined: Sun Feb 08, 2009 2:11 pm
Location: UK


Return to Legacy Attachment MOD Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron