Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: abl_droploader: A native drag & drop multiple image uploader
Also I compared the page output between a regular state and after deleting an image,
and found that it doesn’t get reloaded because it does not output these lines:
<link rel="stylesheet" href="../res/css/abl.droploader-app.css" type="text/css" media="screen,projection" />
<script type="text/javascript">
var file_max_upload_size = 1.907349;
var file_max_files = 5;
var image_max_upload_size = 1;
var image_max_files = 100;
var reload_image_tab = 1;
</script>
<script src="../res/js/jquery.filedrop.js" type="text/javascript"></script>
<script src="../res/js/jquery.droploader.js" type="text/javascript"></script>
<script src="../res/js/abl.droploader-app.js" type="text/javascript"></script>
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
A Fix
A fix for the plugin that doesn’t get reloaded after deleting an image.
There is a need to add another “step” case of “image_multi_edit” in the if-statement at line #366:
From:
if (($event == 'image' && ($step == 'list' || $step == 'image_list' || $step ==''))
To:
if (($event == 'image' && ($step == 'list' || $step == 'image_list' || $step =='image_multi_edit' || $step ==''))
(Still got that issue when replacing an image, for now I just hide the replacing option)
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
A Workaround
A workaround/fix to prevent the status message when replacing an image:
Not really a fix more like a workaround, to check the global var $step
and if it is ‘image_replace’ to not output that message.
At the bottom of the plugin code replace:
from:
function abl_droploader_image_uploaded($event, $step, $id) {
$response = array(
'status' => 1,
'image_id' => $id,
);
echo json_encode($response);
exit;
}
to:
function abl_droploader_image_uploaded($ablevent, $ablstep, $ablid) {
global $step;
if($step != 'image_replace'){
$response = array(
'status' => 1,
'image_id' => $ablid,
'step' => $ablstep,
);
echo json_encode($response);
exit;
}
}
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
Hi all
Finally, I’m back. Sorry to all, i have not realized that there are so many replies. And I was absorbed by other things…
But now, I have some good news. Today, I released a new Version (0.14), that fixes most issues reported here. It’s a bugfix release only, so there are no new features.
The incorrect display of a JSON String (e.g. {“status”: 1,“image_id”: 123}), for example after editing a single image should not happen again. This problem came from the image_uploaded-callback, used to create a JSON formatted result for the calling JavaScript. This callback is now skipped, if the form is not sent by the droploader-js.
Another important fix is for the inaccessible UI problem, which has occurred when the image-list was empty (no images, no search result), after list-operations like deleting images, and also after changing the number of images to show on one page. The reason for this is a missing pluggable_ui-callback in the image-module txp_image.php (step: extend_controls). This callback isn’t executed when the list is empty. To avoid this, the ‘Upload Images’ link will now be rendered using JavaScript instead of the ui-callback.
Two other changes are made for a better look and usability with some admin themes.
A lot of thanks goes to all that have reported issues or made suggestions how to solve or circumvent these problems! A special thanks goes to “the blue dragon” which has posted some suggestions today. You are right! The changes I made are very similar to your suggestions.
Thanks also for new ideas (e.g. adding a new category). I remember them, but I don’t know if and when I can realize these.
Another Version is in progress too, with support for files and alt-, title- and description-text. It’s feature-complete, but not tested enough.
I have also updated the initial post, to reflect the changes made.
And last but not least: A good new Year!
Offline
#53 2013-01-07 17:36:52
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: abl_droploader: A native drag & drop multiple image uploader
Great news Andreas!
And – a bit late – good new year to you :)
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
Hello again
Just after releasing Version 0.14, I found some more issues. Therefore I made a new bugfix-release, version 0.15, which is now available.
This release adresses the following issues:
- Thumbnail dimensions where always set to 100×100 pixels after installing the plugin.
- DropLoader was diabled after editing an image.
- Bad behaviour after upload errors.
Additionally, I changed the default value for option “reload image list after upload” to false. I have done this, because pages may contain post-data. Reloading such a page will show a message-box (at least in firefox).
These things should now be fixed with the new Version.
As usual, I have also updated the initial post
I would also like to add abl_droploader to the list of plugins on textpattern.org. How can I get a login?
Offline
#55 2013-01-08 14:13:52
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,310
Re: abl_droploader: A native drag & drop multiple image uploader
developr wrote:
I would also like to add abl_droploader to the list of plugins on textpattern.org. How can I get a login?
ATM, the most reliable step, I think, is to use a forum email link for sending Stef/Bloke mail.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
Ahh, it’s so simple…
Thank you, Uli!
Offline
#57 2013-01-08 16:30:31
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,310
Re: abl_droploader: A native drag & drop multiple image uploader
developr wrote:
Thank you, Uli!
Thank you for continually updating your plugin :)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
Hey Andreas, thank you very much for updating your great plugin. I like it a lot and so do clients who use it. I think it nicely bridges a TXP chasm.
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
Love it. Thanks for an excellent plugin.
Must tinker though, and the only drawback to you installing the res directory automatically is that it overrides my css mods every time. So I have a suggestion for us modders and tinkerers… add a line at the top of your css file to import a custom stylesheet as well. eg…
@import url(‘abl.droploader-custom.css’);
Last edited by mrdale (2013-01-09 16:22:56)
Offline
Re: abl_droploader: A native drag & drop multiple image uploader
Hi mrdale
Including a custom stylesheet is a very good idea! The appearance of the DropLoader is far from perfect. The reason for this is simple: I am not a designer.
I definitely include something like this in the next release. But the @import at-rule may slow down pages according to GTmetrix. Perhaps I add a plugin-pref “custom stylesheet” (value: path/filename) for that purpose. Including this file after the default styles may make overrides simpler.
Would that work for you (and others)?
The other thing is that (non-standard) res folder and the installation procedure itself. Just overwrite files and prefs on installation is not really ideal. User element has also stated in an earlier post, that he prefers other locations for resources.
Maybe this could be accomplished using some kind of pre-installation configuration, somewhere between uploading the plugin and it’s activation. I am not sure if this is possible, but I can think of many uses for such a feature. I will do some investigation about this, when I have time.
Offline