MyDropzone replaces MyBB's default attachments behavior with a reliable drag and drop solution (Dropzone.js) which uses AJAX instead. Uploading an attachment becomes extremely easy and fast.
MyDropzone adds 1 stylesheet and 3 templates which overwrite the default ones during runtime. Existing templates are not edited nor deleted.
Minimum requirements
PHP 5.4
MyBB 1.8.0
Features
MyDropzone does not come with many complicated features other than being a neat replacement for the attachments box, and that's pretty much it. MyDropzone inherits all the existing attachments features – except for approving/unapproving, which is not available in the current version. A special mention goes to Imgur.com support which lets your users upload images anonymously to Imgur.com and the generated URL will be added to their messages as soon as the upload finishes.
Quick reply attachments
MyDropzone adds support for posting attachments from quick reply. However, it does not edit any templates, so in order to use this functionality you need to alter templates by yourself. This decision was made because in the past, many lamented that a particular functionality in other plugins was not working while they were using a custom theme and the search and replace routine was not able to find the associated pattern.
If you want to enable your users to post attachments from quick reply, edit your showthread_quickreply template, and add the following variable wherever you want the box to appear:
{$attachbox}
This loads nothing but the post_attachments template as it does in New Reply, New Thread, Edit Post, etc.. Once you style the attachment box, quick reply automatically inherits the same styling.
Multiple attachments simultaneously
MyDropzone supports uploading multiple attachments at the same time. Just drag and drop how many attachments you want to upload, and it will handle all of them at once till the maximum limit (which inherits from the attachments system settings) is reached.
This feature is also available on stock MyBB 1.8.19 onwards.
Imgur.com support informations
How to get the Client ID
In order to upload images to Imgur, you need to enter a Client ID in MyDropzone settings, otherwise the plugin will fall back to default server uploading.
If you do not have an Imgur.com account, register for free and go to this page to create a new application. Fill the informations and select Anonymous usage without user authorization under Authorization type.
When you have finished, go to this page and copy the Client ID, add it to MyDropzone settings and enjoy.
Rate limits
Imgur.com limits their API usage to 1250 uploads per day. Although this should be ok with most of MyBB boards out there, if you are running a big board (100k+ users) you may want to switch to normal image handling. For more informations on limitations imposed by Imgur.com, visit this page.
Notice under the attachment box
Due to the fact that MyDropzone does not edit templates, I have added a notice to the mydropzone_attachments_new template informing users that their images are posted to Imgur. If you are not willing to use this feature, delete the corresponding HTML you can find in the template.
Customization
You can completely customize MyDropzone's appearance by tweaking with its templates (MyDropzone Templates Group) and its stylesheet (mydropzone.css). Support will be given when possible.
Compatibility
MyDropzone is compatible with MyBB 1.8.0+ and PHP 5.4+. Browser compatibility is listed on Dropzone.js documentation.
Credits to Shade at MyBB Boost -
https://www.mybboost.com/thread-release-mydropzone-1-2
MyDropzone thay thế hành vi tệp đính kèm mặc định của MyBB bằng giải pháp kéo và thả đáng tin cậy (Dropzone.js) sử dụng AJAX thay thế. Tải lên tệp đính kèm trở nên cực kỳ dễ dàng và nhanh chóng.
MyDropzone thêm 1 stylesheet và 3 mẫu ghi đè lên các mẫu mặc định trong thời gian chạy. Các bản mẫu hiện có không được chỉnh sửa hoặc xóa.
Yêu cầu tối thiểu
PHP 5.4
MyBB 1.8.0
Tính năng
MyDropzone không đi kèm với nhiều tính năng phức tạp ngoài việc thay thế gọn gàng cho hộp đính kèm và thế là khá nhiều. MyDropzone kế thừa tất cả các tính năng tệp đính kèm hiện có - ngoại trừ phê duyệt / hủy phê duyệt, không có sẵn trong phiên bản hiện tại. Một đề cập đặc biệt dành cho bộ phận hỗ trợ Imgur.com cho phép người dùng của bạn tải hình ảnh ẩn danh lên Imgur.com và URL được tạo sẽ được thêm vào tin nhắn của họ ngay sau khi quá trình tải lên kết thúc.
Tệp đính kèm trả lời nhanh
MyDropzone bổ sung hỗ trợ đăng tệp đính kèm từ trả lời nhanh. Tuy nhiên, nó không chỉnh sửa bất kỳ bản mẫu nào, vì vậy để sử dụng chức năng này, bạn cần phải tự thay đổi bản mẫu. Quyết định này được đưa ra bởi vì trong quá khứ, nhiều người than thở rằng một chức năng cụ thể trong các plugin khác không hoạt động khi họ đang sử dụng chủ đề tùy chỉnh và quy trình tìm kiếm và thay thế không thể tìm thấy mẫu liên quan.
Nếu bạn muốn cho phép người dùng đăng tệp đính kèm từ trả lời nhanh, hãy chỉnh sửa mẫu showthread_quickreply và thêm biến sau ở bất cứ nơi nào bạn muốn hộp xuất hiện:
{$attachbox}
Thao tác này không tải gì ngoài mẫu post_attachments như trong Trả lời mới, Chủ đề mới, Chỉnh sửa bài đăng, v.v. Sau khi bạn tạo kiểu cho hộp tệp đính kèm, trả lời nhanh sẽ tự động kế thừa cùng một kiểu dáng.
Nhiều tệp đính kèm đồng thời
MyDropzone hỗ trợ tải lên nhiều tệp đính kèm cùng một lúc. Chỉ cần kéo và thả số lượng tệp đính kèm bạn muốn tải lên và nó sẽ xử lý tất cả chúng cùng một lúc cho đến khi đạt đến giới hạn tối đa (kế thừa từ cài đặt hệ thống tệp đính kèm).
Tính năng này cũng có sẵn trên cổ phiếu MyBB 1.8.19 trở đi.
Thông tin hỗ trợ Imgur.com
Cách lấy ID khách hàng
Để tải hình ảnh lên Imgur, bạn cần nhập ID khách hàng trong cài đặt MyDropzone, nếu không plugin sẽ quay trở lại tải lên máy chủ mặc định.
Nếu bạn chưa có tài khoản Imgur.com, hãy đăng ký miễn phí và truy cập trang này để tạo ứng dụng mới. Điền thông tin và chọn Sử dụng ẩn danh mà không cần ủy quyền của người dùng trong Loại ủy quyền.
Khi bạn hoàn tất, hãy truy cập trang này và sao chép ID khách hàng, thêm nó vào cài đặt MyDropzone và tận hưởng.
Giới hạn tốc độ
Imgur.com giới hạn mức sử dụng API của họ ở mức 1250 lượt tải lên mỗi ngày. Mặc dù điều này sẽ ổn với hầu hết các bo mạch MyBB hiện có, nhưng nếu bạn đang chạy một bo mạch lớn (100k+ người dùng), bạn có thể muốn chuyển sang xử lý hình ảnh bình thường. Để biết thêm thông tin về các giới hạn do Imgur.com áp đặt, hãy truy cập trang này.
Thông báo dưới hộp đính kèm
Do thực tế là MyDropzone không chỉnh sửa bản mẫu, tôi đã thêm một thông báo vào mẫu mydropzone_attachments_new thông báo cho người dùng rằng hình ảnh của họ đã được đăng lên Imgur. Nếu bạn không sẵn sàng sử dụng tính năng này, hãy xóa HTML tương ứng mà bạn có thể tìm thấy trong mẫu.
Customization
Bạn hoàn toàn có thể tùy chỉnh giao diện của MyDropzone bằng cách tinh chỉnh các mẫu của nó (Nhóm mẫu MyDropzone) và stylesheet của nó (mydropzone.css). Hỗ trợ sẽ được đưa ra khi có thể.
Tương thích
MyDropzone tương thích với MyBB 1.8.0+ và PHP 5.4+. Khả năng tương thích của trình duyệt được liệt kê trong tài liệu Dropzone.js.
Tín dụng cho Shade tại MyBB Boost -
https://www.mybboost.com/thread-release-mydropzone-1-2