Textpattern Forum

You are not logged in. Register | Login | Help

#21 2012-05-22 19:55:43

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,084

Re: abl_droploader: A native drag & drop multiple image uploader

developr wrote:

btw. This is also a problem of the bot_image_upload plugin.

My turn to say “oops”: you’re right, I didn’t think of that. Even worse as I just saw that it seems to be the default behaviour of TXP to not produce a thumb when no measures are entered.

Thus: a duplicate Thanks, for making your plugin overrule TXPs default and for doing work that I wrongly reported here :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#22 2012-05-23 09:01:55

developr
Plugin Author
From: Basel
Registered: 2011-09-24
Posts: 65
Website

Re: abl_droploader: A native drag & drop multiple image uploader

Hello Uli,

I think it was not so wrong, because the problem has also to do with the (new) workflow:
The classic upload in the image-tab shows the image edit-form after an upload, so the user has always the chance to enter values for the thumb size.

This is not the case when uploads are made with DropLoader, so I changed the setup procedure in version 0.12 to avoid this. Defaults are now set once, if they are not present.

This is the code:

		if (!isset($prefs['thumb_w'])) set_pref('thumb_w', '100', 'image', PREF_HIDDEN);
		if (!isset($prefs['thumb_h'])) set_pref('thumb_h', '100', 'image', PREF_HIDDEN);
		if (!isset($prefs['thumb_crop'])) set_pref('thumb_crop', '1', 'image', PREF_HIDDEN);

Hope it’s correct.

Anyway, it may be a good idea to provide default values in the TXP distribution package. Changing this should not be a problem, because users can override it at any time.

Offline

#23 2012-05-23 15:32:50

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,399

Re: abl_droploader: A native drag & drop multiple image uploader

Hi all,
this is a great plugin which offers a functionality I wished to add since ages, kudos to Andreas!
That said I didn’t even had the time to read the whole thread because my house is undergoing a heavy renovation and I barely managed to switch on my computer – buried under mountains of dust (cough).
I promise as I’ll have again a livable house (in the next two weeks I hope) I’ll do my best to make this plugin and bot_image_upload happily live together.

Offline

#24 2012-05-24 16:49:25

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: abl_droploader: A native drag & drop multiple image uploader

Is there an easy way to update bot_image_upload’s thumbnails after using abl_droploader on the write tab?
Can I call a function or something?

Loving this plugin!

Andreas, is there an textpack available for this plugin? All my text look like abl_droploader_info_text :( I’m new to this ln10 stuff….can I update the text manually?

Last edited by jelle (2012-05-24 16:53:15)

Offline

#25 2012-05-24 19:08:32

developr
Plugin Author
From: Basel
Registered: 2011-09-24
Posts: 65
Website

Re: abl_droploader: A native drag & drop multiple image uploader

@redbot:
Good luck with your renovation!
Meanwhile, I try to support file uploads too. Have some problems with it , but I hope I can solve this.

@jelle:
When images are added directly (not with bot_i_u), then you must save the article to see the added picture. At the moment I see no way to change this.
DropLoader fires the change-event on the article-image field after images are added, but this seems not to be enough. I think we must wait until redbot has some time.

When using DropLoader (v0.12) from bot_i_u, then pictures are added to the list when DropLoader is closed. Have no better solution for now. Sorry.

The Textpack problem sounds strange.
Two Textpacks are compiled in: English & German (en-gb, de-de). These Strings will be stored in table ‘txp_lang’ when the plugin is installed. The name of all language strings starts with “abl_droploader_”.

However, I post them here:

#@language en-gb
abl_droploader_open => Upload Images
abl_droploader_open_files => Upload Files
abl_droploader_open_title => Open drag & drop file uploader
abl_droploader_close => ×
abl_droploader_close_title => Close DropLoader
abl_droploader_error_method => Method {{method}} does not exist in abl.droploader-app.js.
abl_droploader_info_text => Drop files here\\n\\nor click to select files
abl_droploader_err_invalid_filetype => Cannot upload {{filename}}. Only images are allowed (jpg, jpeg, gif, png)!
abl_droploader_err_browser_not_supported => Your browser does not support HTML5 file uploads!
abl_droploader_err_too_many_files => Too many files! Please select {{maxfiles}} at most!
abl_droploader_err_file_too_large => {{filename}}\\ntoo large!
abl_droploader_all_files_uploaded => {{uploaded_files}} of {{filecount}} files uploaded.
abl_droploader_no_files_uploaded => There are {{errors}} errors. No files where uploaded.
abl_droploader_some_files_uploaded => There are {{errors}} errors. {{uploaded_files}} of {{filecount}} files uploaded.
abl_droploader_prefs_image_max_upload_count => Maximum file count of image uploads
abl_droploader_prefs_file_max_upload_count => Maximum file count of file uploads
abl_droploader_prefs_reload_image_tab => Images-Tab: Close Droploader and reload image list after upload
#@language de-de
abl_droploader_open => Bilder hochladen
abl_droploader_open_files => Dateien hochladen
abl_droploader_open_title => Drag & Drop Datei-Uploader öffnen
abl_droploader_close => ×
abl_droploader_close_title => DropLoader schliessen
abl_droploader_error_method => Methode {{method}} existiert in abl.droploader-app.js nicht.
abl_droploader_info_text => Bilder hier ablegen\\n\\noder klicken um auszuwählen
abl_droploader_err_invalid_filetype => {{filename}} nicht hochgeladen. Es sind nur Bilder erlaubt (jpg, jpeg, gif, png)!
abl_droploader_err_browser_not_supported => Ihr Browser unterstützt keine HTML5 Datei Uploads!
abl_droploader_err_too_many_files => Sie haben zu viele Dateien ausgewählt! Es können maximal {{maxfiles}} Dateien gleichzeitig hochgeladen werden!
abl_droploader_err_file_too_large => {{filename}}\\nzu gross!
abl_droploader_all_files_uploaded => {{uploaded_files}} von {{filecount}} Dateien hochgeladen.
abl_droploader_no_files_uploaded => Es sind {{errors}} Fehler aufgetreten. Es wurden keine Dateien hochgeladen.
abl_droploader_some_files_uploaded => Es sind {{errors}} Fehler aufgetreten. {{uploaded_files}} von {{filecount}} Dateien wurden hochgeladen.
abl_droploader_prefs_image_max_upload_count => Maximale Anzahl Dateien beim Bild-Upload
abl_droploader_prefs_file_max_upload_count => Maximale Anzahl Dateien beim Datei-Upload
abl_droploader_prefs_reload_image_tab => Bilder Register: Droploader nach dem upload schliessen und Bildliste neu laden

Textpacks can be imported in Txp from the admin-tab (Preferences/languages). A Form is at the bottom of this page, but I have never used it. So I can’t give instructions on how to use this form.

Hope this helps anyway.

Offline

#26 2012-05-24 19:23:46

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: abl_droploader: A native drag & drop multiple image uploader

Hi Andreas,

Thanks for your answer.
My site is set to dutch. Thats probably why I get the abl_ strings in stead of text. I’ll translate and post when I’m done for dutch users.

Looking forward to file support….

J.

Offline

#27 2012-05-24 21:09:46

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,188
Website

Re: abl_droploader: A native drag & drop multiple image uploader

I’d recommend using your en-gb textpack for en-us as well. That will prevent en-us installs from showing just the abl_droploader strings.


My Plugins

Piwik Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#28 2012-05-24 21:23:12

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,909
Website

Re: abl_droploader: A native drag & drop multiple image uploader

MattD wrote:

I’d recommend using your en-gb textpack for en-us as well.

Or (untested, but purports to work) drop the #@language declaration from the first set of strings, so that the (English) strings get installed against whatever default language the recipient’s system is using. At least the strings are there and can then be translated, instead of being raw string refs.

I’ve not confirmed (yet) whether doing this and having, say, both English and German textpacks embedded into the plugin, will mean that sites with German language will skip the (no-language-declaration) strings and install the German ones, or if they’ll get the English strings anyway because the declaration is missing off the first block. It may be the case that — in a single-language German installation, for example — the no-declaration (English) strings are installed, and then the German ones are loaded too because they match the installed language, effectively overwriting the English ones that have just been inserted *shrug*.

The latest development copy of the Plugin composer supports textpacks and this kind of thing is the last kink I’m trying to iron out before letting it out for beta testing.

Last edited by Bloke (2012-05-24 21:24:17)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#29 2012-05-24 22:56:11

jelle
Member
Registered: 2006-06-07
Posts: 165

Re: abl_droploader: A native drag & drop multiple image uploader

Dutch Textpack (improvements welcome)

#@language nl-nl
abl_droploader_open => Afbeeldingen uploaden
abl_droploader_open_files => Bestanden uploaden
abl_droploader_open_title => Open drag & drop file uploader
abl_droploader_close => ×
abl_droploader_close_title => Sluit DropLoader
abl_droploader_error_method => Methode {{method}} wordt niet ondersteund door abl.droploader-app.js.
abl_droploader_info_text => Sleep bestanden hier naartoe\n\nof klik om bestanden te selecteren.
abl_droploader_err_invalid_filetype => Kan {{filename}} niet uploaden. Alleen afbeeldingen zijn toegestaan (jpg, jpeg, gif, png)!
abl_droploader_err_browser_not_supported => Uw browser ondersteund geen HTML5 upload!
abl_droploader_err_too_many_files => Teveel bestanden! Kies alstublieft maximaal {{maxfiles}} bestanden!
abl_droploader_err_file_too_large => {{filename}}\nte groot!
abl_droploader_all_files_uploaded => {{uploaded_files}} van {{filecount}} bestanden ge-upload.
abl_droploader_no_files_uploaded => Er zijn {{errors}} fouten. Er zijn geen bestanden geupload.
abl_droploader_some_files_uploaded => Er zijn {{errors}} fouten. {{uploaded_files}} van {{filecount}} bestanden geupload.
abl_droploader_prefs_image_max_upload_count => Maximaal aantal afbeeldingen voor upload
abl_droploader_prefs_file_max_upload_count => Maximaal aantal bestanden voor upload
abl_droploader_prefs_reload_image_tab => Afbeeldingen-Tab: Sluit Droploader en ververs afbeeldingenlijst na upload

Last edited by jelle (2012-05-25 09:58:52)

Offline

#30 2012-05-25 09:56:26

developr
Plugin Author
From: Basel
Registered: 2011-09-24
Posts: 65
Website

Re: abl_droploader: A native drag & drop multiple image uploader

@jelle & Matt:

Thanks for the info, I was not aware of this problematic with localised Textpattern setups.
I try to change the behavior for the DropLoader, so that english texts will be used if the default language is not set to “en-gb”.

Thanks to Stef, I know now how to do it. Stef, your tips are just invaluable! Maybe it’s a good idea to put this information on the wiki too (Extending Textpattern).

A special thanks to jelle for providing the nederlands translation. I prepare an article on my site, where i will provide contributed textpacks for download. I will drop a note here and in the original post when it is ready.

Offline

Board footer

Powered by FluxBB