MyBB Community Forums

Full Version: Max Attachments
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Looking for some help in allowing my visitors to upload multiple attachments at once. Doing one at a time is too cumbersome.

I used MaxAttachments 2.0 on my 1.6 site with no problems. With 1.8 it gives me the dreaded "The file upload failed. Please choose a valid file and try again. Error details: PHP returned error code: Array. Please contact your forum administrator with this error." regardless if an attachment is there or not.

I added 18* to the compatibility section of the plugin. That allowed me to install, but the functionality of the plugin will not allow my users to post.

Any other changes that I would need to make in order to get this plugin to work? Or am I missing something in terms of allowing my users the ability to bulk upload as 1.8 stands.

FWIW: I have tried the AJAX multiupload plugin but I do not like the way its designed.

Thanks in advance!
MaxAttachments 2.0 uses modified versions of newthread.php, newreply.php and editpost.php.
The fundamental code from 1.6 works in 1.8 with some tweaks.
Currently using hardcoded attachment counts and manually entered template code in post_attachments_new

Unable to contact 5n0w833 for permission.
Added: Actually, don't require permission under GPL. I have retained his original comments. He did not respond to email contact.
Can you post me your modified version by email? Thank you very much!
I will attach here for all to see. Please note this is a work in progress. Code retains original comments, a couple are mine. Original 1.8.9 code is commented out. I may have not identified a change. It works on a clean 1.8.9 forum not running any plugins.

Message for all:
THIS IS NOT A PLUGIN. IT IS CORE EDITS. KEEP ORIGINAL FILES INTACT IN CASE SOMETHING GOES WRONG. YOU ARE RESPONSIBLE FOR ITS USE.

The files are 1.8.9 modified. I have not worked with earlier 1.8 versions.

These are hard-coded for 10 items at a time. I am not using ACP portion of 1.6 plugin.

To install:
1. Rename text files to drop TXT extension.
2. FTP to forum file location. SAVE ORIGINAL FILES FIRST.
3. ACP to modify template post_attachments_new to include new text attached.
4. Reload forum display.

To use:
You can enter up to 10 at a time, up to forum max each post. My forum ACP is set to 50 max per post. I have not tested different values.
Load the list, then click Add Attachment button.
This uploads the first batch, then returns with another blank list of 10.

Once some files have already been uploaded, then Update Attachment and Add Attachment buttons do the same thing.

You can either Post Thread button and attachments are posted in the order added,
or you can click each Insert Into Post button in the order you want them to appear.

It does not require they be sequentially entered in the list. Blank lines where no file selected are ignored. 

Mods: if this post is not permitted or in the wrong forum, please correct. Thank you.