MyBB Community Forums

Full Version: I want these very importent mods
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Can anyone help me on this ,I want the following mods if it possible and you have time to make them :neautral:

1- No one can download the attachments until he reach specific number of posts e.g 10

2- No one can download the attachments untill he reply to the thread ( seperated from the 1st mod )

3- No one can use or view the PMs untill he reach specific number of posts e.g 10


Thank you,
I've just downloaded mybb and looking at the code. The code I'm going to give you now isn't the best but it's a quick solution to number 1 on your list. You will have to manually add it but it works. It's a quick and dirty solution to your problem.

Replace line 44 of attachment.php with
if($forumpermissions['canview'] == "no" || $forumpermissions['candlattachments'] == "no")

With
$query = $db->query("SELECT COUNT(pid) AS post_count FROM ".TABLE_PREFIX."posts WHERE uid='".$mybb['uid'] . "'");
$post_count = $db->fetch_array($query);
$post_count = $post_count['post_count'];

if($forumpermissions['canview'] == "no" || $forumpermissions['candlattachments'] == "no" || $post_count < 10)

If you want to change the 10 at the end of the IF statement to something else then you will have to edit the file and re-upload it. Told you it was a quick and dirty method Toungue
If you haven't installed any mods that have changed the attachment file, you can use the attached file instead of the one you use. (Keep the original as a backup just in case)

You will need to add two settings via the admin panel into which ever group you want,

1)
Title: Attachment Min Posts
Desc: The minimum number of posts that a user must have before they can download the file
Setting Name: attachment_min_posts
Type: text
Value: 10
Order: 1

2)
Title: Attachment Reply
Desc: The user must have replied to the topic before they can download the file
Setting Name: attachment_reply
Type: yesno
Value: no
Order: 2
Thank you decswxaqz this is a great job

still No. ( 3 ) if you can help Smile

Thanks again
I've not looked into the PM system yet......

Just working on simple cash mod for the time being Smile