XUpload - Wordpress integration

Posts: 8
Joined: Mar 23, 2011 7:20 pm

Wordpress integration

#1 Postby INTERNOZEROUNO » May 03, 2011 5:02 pm

Hi, I am trying to integrate Xupload with a Wordpress installation... Well, the easyest way is to put the form inside a iframe, but I don't like it.

I found out the problem is jQuery, disabling it Xupload works. What's the problem with jQuery? How can I make Xupload work even if jQuery is used in the same page?

Posts: 8
Joined: Mar 23, 2011 7:20 pm

#2 Postby INTERNOZEROUNO » May 04, 2011 9:27 am

Searching for a solution, I found this and it really works:

Change every $ in xupload.js into $$
Change the settings part in upload.cgi into this:

Code: Select all

if($ENV{QUERY_STRING} =~ /^settings/)
   $c->{pass_required} = $c->{upload_password}&&1;
   print"Content-type: text/html\n\n";
   print"$_='$c->{$_}';" for qw(ext_allowed ext_not_allowed max_upload_files max_upload_size enable_file_descr pass_required email_required);
   print qq[if(\$\$('x_max_files'))\$\$('x_max_files').innerHTML = '$c->{max_upload_files}';];
   print qq[if(\$\$('x_max_size'))\$\$('x_max_size').innerHTML='$c->{max_upload_size}';];
   print q[if($$('x_password')){$$('x_password').style.display='block';}] if $c->{pass_required};
   print q[if($$('x_folder')){$$('x_folder').style.display='block';}] if $c->{allow_ext_folder};

Return to “XUpload”