A few days ago I started making a multi-upload mod, which actualy is very simular to rroc's
[MOD] multiupload, but it uses "modules" that allow use of other tools, such as Java applets for uploading files. Besides that, "modules" type will simplify installation process and make updates painless (just replace files with new version)
At this stage, the mod includes two "modules": basic and JUpload.
Basic - is plain multi field page, where each file must be selected manualy one-by-one like on a regular upload page.
JUpload - is a free Java applet from
www.jupload.biz which supports "drag'n drop" feature
. Unfortunetly the applet is very buggy and half of the features dont work properly...
Yet, I've tryed go around each bug, it seems to work "fine", atleast from JavaScript part. Also, I must say, at the moment JUpload module does not work with other browsers but only on Internet Explorer
Since this is a beta version, I will include minimum installation instruction and will not include any extra modifications to add links/buttons to multi-upload pages, you will need type url in the browser manualy (this way you can use it on your site without anyone knowing it exists, which may be a security benefit
)
So, here it goes:
Step 1Download file from the attachment at the end of this thread.
Unpack it and upload all files to your site, make sure restore the directory tree (create new folders if dont exist):
includes/
mupload.phpincludes/
mu_modules/basic.php[/b]
includes/
mu_modules/jupload.phpincludes/
mu_modules/jupload/jupload.jartemplates/
<your template>/
member_mupload_jupload.htmltemplates/
<your template>/
member_muploaddropdown.htmltemplates/
<your template>/
member_muploadform_basic.htmltemplates/
<your template>/
member_muploadform_basic_bit.htmltemplates/
<your template>/
member_muploadform_jupload.htmlStep 2Open
member.phpFind:
include(ROOT_PATH.'includes/page_header.php');
Comment it out (add # or // at the beginning of this line) or simply remove it.
Step 2.1Find:
$sendprocess = 0;
Insert
below:
/*
MOD MULTI-UPLOAD-PLUS
BEGIN INSERT
*/
if ($action == "muploadimage" || $action == "muploadform")
{
$dir = opendir(ROOT_PATH."includes/mu_modules/");
$mu_modules = array();
while ($file = readdir($dir))
{
if (is_file(ROOT_PATH."includes/mu_modules/".$file) && !is_dir(ROOT_PATH."includes/mu_modules/".$file) && substr(strrchr($file,"."), 1) == "php") $mu_modules[] = $file;
}
closedir($dir);
include(ROOT_PATH.'includes/mupload.php');
}
include(ROOT_PATH.'includes/page_header.php');
/*
MOD MULTI-UPLOAD-PLUS
END INSERT
*/
Step 3Open templates/<youre template>/
header.htmlFind
<body (that line might contein other stuff)
Now, look if in that tag present
onLoad="" (probably if its present it has some stuff between the quotes)
If you found one, then right after first quote add:
{mupload_onload} tag. (i.e. if you found something like this:
<body onLoad="somestuff();">
then after modification it should look like this:
<body onLoad="{mupload_onload} somestuff();">
If you did not have any onload="" thing, then simply add one, after space after
<body (as in the example above, but without
somestuff(); )
That it.
Now, how to use it.
In the address bar of your browser (I'd suggest you test it on IE first) type:
1) for "basic" form:
http://<youraddress>/path/to/4images/member.php?action=muploadform or
http://<youraddress>/path/to/4images/member.php?action=muploadform&mutype=basic2) for "JUpload form:
http://<youraddress>/path/to/4images/member.php?action=muploadform&mutype=juploadP.S.
Here is a list of planned features:
- auto resize images
- auto copy original images into "big" folder (only if resized)
- auto backup original images into user-defined directory (with additional code this could be used later for restoration and/or reading EXIF/IPTC info)
- support for watermark by SLL
Version history:
v0.3b
- fixed thumbnails wouldnt upload
- fixed template can not be found error if upload error
v0.2b
- added support for
[MOD] Categories upload dropdown form (replace includes/mupload.php)
v0.1b
- original release
Some screenshots:
Basic:
JUpload: