Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
File Upload One Click Button
Avatar
0044s
Member
Free Members
sp_UserOfflineSmall Offline
Apr 4, 2012 - 5:51 pm

hello,

 

i installed the plugin, even managed to enable guests to upload files. everything works like a charme. now what i still want  to do is merge the "add file " and "start upload" buttons. no need for a seperated process. i only need one button: "add file" -when clicked i want the user to choose a file, and the image to be instantly uploaded with the code copied into the textarea.

 

what i tried was triggering the hided "start upload" button with jquery when "add file" is clicked. didn't work.

and plupload.full.js and jquery.ui.plupload.js are quite hard to rewrite. any help?

 

thanks,

stefan

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 4, 2012 - 8:04 pm

wow. impressive.

as you probably know, plupload is third party software that we did not write...  and as such, afraid we dont know much about those js files either...

have you looked at the plupload api: http://plupload.com/plupload/d.....index.html

I have to wonder if its possible to use some of their events to do what you want...

the problem with jquery and triggering or clicking (did you try the latter - click()?) might be that it doesnt work on hidden elements - unsure...

Avatar
0044s
Member
Free Members
sp_UserOfflineSmall Offline
Apr 5, 2012 - 8:04 am

thanks for the link, made me find a solution!

find the javascript part in sp-plupload-components.php and simply add

uploader.bind('FilesAdded', function(up, files) {
uploader.start();
});

 

🙂

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 5, 2012 - 1:47 pm

Nicely done.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625