DropLoader for Textpattern CMS allows you to upload multiple images at once, simply by dragging files from the desktop onto the browser window. The user interface of DropLoader is a transparent area, shown above Textpatterns own UI.

A special feature of DropLoder is the fact, that it hides the standard upload-form, but uses it in the background for sending the data to server. The form-data will therefore be processed by Textpatterns regular image upload-script, txp_image.php.

DropLoader is enabled in two places. On the image-tab (Menu: Content > Images), where it replaces the standard upload-form, but also on the write-tab (Content > Write). This makes it possible to upload images right from there, without a need to switch between the write- and image-tabs. Uploaded images will be automatically assigned to the current article (field article image), if DropLoader is opened directly from the write-tab.

It is also possible to automatically assign a category to the uploaded images. Simply select a category, before files are dropped or selected.

Both, “Drag & Drop” and the upload functionality is based on the jQuery plugin jquery.filedrop.js by Weixi Yen. Thanks!

Browser Support

The jQuery-plugin filedrop requires the “File Reader API” and the “Drag & Drop API”. DropLoader disables itself, if these API’s are not supported.

Recent versions of Firefox and Google Chrome supports all features and work perfectly. However, Internet Explorer (incl. IE9), Opera and Safari currently do not support all of the required API’s, so DropLoader will not be available with these browsers.

Features

  • Enables uploading of multiple images at once
  • File selection using drap & drop or the file open-dialog
  • Hides the standard upload-form in the images-tab
  • Automatically assign image-category to each uploaded image (optional)
  • Automatically create thumbnail, if thumbnail dimensions are available
  • Fully compatible to the standard image upload-form: Form data is posted to the same script (txp_image.php) for processing
  • Enables image uploads directly from the write-tab (Article detail/edit view)
  • Automatically assign uploaded images to the current article’s images-field (only if DropLoader has been opened directly from the write-tab)
  • Supports localisation (l10n) using textpacks.
  • DropLoader can also be used by other Textpattern plugins, e.g. from file- or image-pickers/selectors.

Requirements

Textpattern 4.4.1+.

Important: To be able to edit preferences, the plugin soo_plugin_pref is required. Hard coded default preferences apply, if soo_plugin_pref is not installed.

Author

Andreas Blaser (web)

Installation

This plugin can be installed and activated as usual on the plugins-tab.

DropLoader requires some additional resources (jQuery plugins, stylesheet), which are installed when the plugin is activated.

Note:
When upgrading abl_droploader from a previous version, you may need to clear the browser cache.

The following files will be installed on plugin activation:

  • / (site-root)
    • res/
      • css/
        • abl.droploader-app.css
      • js/
        • jquery.filedrop.js
        • jquery.droploader.js
        • abl.droploader-app.js

Localisation

DropLoader uses textpacks for localisation. The distribution package already contains textpacks in english (en-gb) and german (de-de). These and other Textpacks for abl_droploader are available as separate downloads.

The name of all language strings begins with ‘abl_droploader_’.

Note: Starting with Version 0.13, the english textpack will also be installed under the language-key for the current site language, if this is not en-gb or de-de. These strings can then be translated to the desired language, for example using the snippet editor of the MLP (Multi-Language Pack).

Thanks to Stef Dawson for this tip!