Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2009-04-20 01:07:19
- grundgesetz
- Plugin Author
- From: Germany
- Registered: 2009-04-17
- Posts: 24
Re: jbx_multiple_image_upload
Hey Folks…
I had some spare time, so i completely revised the code.
jbx_multiple_image_upload v0.3a
- Bloke: changed directory to images/upload
- jm: used a class now. nearly no globals, no constants, please have a short expert-look into it ;) I tried to make it PHP4-compatible.
What do you say?
Last edited by grundgesetz (2009-04-20 01:08:29)
Offline
Re: jbx_multiple_image_upload
grundgesetz wrote:
What do you say?
I say hooray! Very nice. I assume there’s a five file limit…
Offline
#18 2009-04-20 01:31:56
- grundgesetz
- Plugin Author
- From: Germany
- Registered: 2009-04-17
- Posts: 24
Re: jbx_multiple_image_upload
mrdale wrote:
I say hooray! Very nice. I assume there’s a five file limit…
Oh :D Didn´t mind that. -> now is 100. Don´t know about perfomance at that numbers though…
Last edited by grundgesetz (2009-04-20 01:32:07)
Offline
Re: jbx_multiple_image_upload
Yeah, maybe add the file limit to the admin tab. Other than that, this is mucho cool.
Offline
#20 2009-04-20 02:15:08
- grundgesetz
- Plugin Author
- From: Germany
- Registered: 2009-04-17
- Posts: 24
Re: jbx_multiple_image_upload
Okay I will add that as an option. How about file size limit?
Note: Image Uploads are not restricted by this value. The maximum allowed size for images is always ~ 1MB (unless restricted by PHP as explained above).
What does that mean? Is the only restriction the php.ini?
Offline
Re: jbx_multiple_image_upload
Not as concerned about this file size limitation. Any image that I upload for front-side display is going to be WAY smaller than that, otherwise I upload it as a file for download rather than display.
Offline
#22 2009-04-20 02:34:45
- grundgesetz
- Plugin Author
- From: Germany
- Registered: 2009-04-17
- Posts: 24
Re: jbx_multiple_image_upload
Files Limit is implemented now.
Offline
#23 2009-04-20 10:49:24
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: jbx_multiple_image_upload
This is useful, thanks!
The only issue is the plugin is working ok on a live site but won’t work in my local xampp installation.
I got a flashing warning when I try to upload which complains about the “move_uploaded_file” function in line 37 of upscript_0.3a.php.
Maybe it has to do with the presence of forward/backward slashes in windows?
Another little thing: the warnings are flashing for a second so it’s impossible to read them (I had to hit the “print” key and see the screenshot in another program). maybe it would be better if they remained on the screen.
Other than that it looks really promising, thanks again.
Offline
Re: jbx_multiple_image_upload
Great work grundgesetz :). Something you might want to consider:
- Use TXP core’s
DSconstant instead/(slash) when uploading images (in every dir/file path, you could for example replace the slahesh withDSetc in some situations). The DS constant automatically changes the slash depending on the system. Currently the plugin only works on unix systems that use/and not\. - Maybe put
doSlash()es at the end of strings, after you have textiled or cleared it. Escaping might cause some trouble. For example$catnameon line 419. - On line 82 (and so on). you use
"http://".$prefs['siteurl']."/". You could just usehuthat builds the full address, and doesn’t force the usage ofhttpinstead ofhttps.
Last edited by Gocom (2009-04-20 15:43:42)
Offline
#25 2009-04-20 17:00:41
- grundgesetz
- Plugin Author
- From: Germany
- Registered: 2009-04-17
- Posts: 24
Re: jbx_multiple_image_upload
Thanks to you both, will have a look at the slashes.
I will also think about the warnings during upload process.
Added: Gocom, but $catname is escaped?
$catname = dumbDown($textile->TextileThis(trim(doSlash($catname)), 1));
Last edited by grundgesetz (2009-04-20 17:52:56)
Offline
#26 2009-04-20 22:16:59
- grundgesetz
- Plugin Author
- From: Germany
- Registered: 2009-04-17
- Posts: 24
Re: jbx_multiple_image_upload
Hey folks,
new version:
jbx_multiple_image_upload v0.3c
Changes:
- included all javascript files (gziped them as well), no internet availability needed
- adjusted paths using DS constant to ensure (windows-)compatibility
- will sleep for 3 seconds before updating imagelist
- error output fixed (import/resize/thumbnailing errors)
- eliminated some bugs
Last edited by grundgesetz (2009-04-21 14:16:36)
Offline
#27 2009-04-23 18:05:28
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: jbx_multiple_image_upload
Ok, I’ve tested it but unfortunately there are still some issues:
on a live site works perfectly and it’s really cool.
on my local xampp it now doesen’t work at all (there is absolutely no presence of the plugin in the ‘images’ tab).
I think it still depends from how the slashes are generated.
Here is a small piece of code form my ‘images’ tab source:
var swiffy = new FancyUpload2($('upload-status'), $('upload-list'), {
url: '/\images\upload\upscript_0.3c.php',
data: 'path=C:\xampplite\htdocs\my_site\images\upload\tmp\',
path: '/images\upload\Swiff.Uploader.swf',
limitSize: 2 * 1024 * 1024, // 2Mb
limitFiles:20,
As you can see the urls still seem to be a little messed…
Last edited by redbot (2009-04-23 18:33:12)
Offline
#28 2009-04-24 05:33:01
- grundgesetz
- Plugin Author
- From: Germany
- Registered: 2009-04-17
- Posts: 24
Re: jbx_multiple_image_upload
Okay, I´m really sorry.
I will test the script on my PC today. As it seems, the rhu constant defined by textpattern is relative to the web root, so i will try to apply some changes there.
Offline
Re: jbx_multiple_image_upload
I got this error
“File I/O error #2038”
when upload image. Files Limit is about 4MB . Please help, thanks.
Offline
#30 2009-06-13 15:07:40
- hkaber
- New Member
- Registered: 2009-06-12
- Posts: 3
Re: jbx_multiple_image_upload
When I try to upload image files, all of the image names become highlighted in pink and I get a “security error 2409” . I have no clue as to why. anyone else have or fix this problem? For a time the plugin worked with explorer and not firefox. now it does’t work at all.
Offline