RU ver of article:
http://mart.kiev.ua/uploadify-modx
So, ModX have own file manager, that is really nice, except file upload. If you need download many files - it becomes nightmare.
I make some changes
files.dynamic.php to use
Uploadify (
http://www.uploadify.com/) as default upload tool in modx file manager.
Changes to file are to small to describe them, here is patch:
Index: files.dynamic.php
===================================================================
--- files.dynamic.php (revision 1)
+++ files.dynamic.php (working copy)
@@ -518,7 +518,30 @@
if (((@ini_get("file_uploads") == true) || get_cfg_var("file_uploads") == 1) && is_writable($startpath)) {
@ini_set("upload_max_filesize", $upload_maxsize); // modified by raymond
?>
-<form enctype="multipart/form-data" action="index.php?a=31" method="post">
+
+<link href="<?php echo $modx->config['base_url']?>assets/modules/uploadify/jquery.uploadify-v2.1.0/uploadify.css" rel="stylesheet" type="text/css" />
+<script type="text/javascript" src="<?php echo $modx->config['base_url']?>assets/modules/uploadify/jquery.uploadify-v2.1.0/swfobject.js"></script>
+<script type="text/javascript" src="<?php echo $modx->config['base_url']?>assets/js/jquery-1.3.2.min.js"></script>
+<script type="text/javascript" src="<?php echo $modx->config['base_url']?>assets/modules/uploadify/jquery.uploadify-v2.1.0/jquery.uploadify.v2.1.0.min.js"></script>
+<script type="text/javascript">
+var fileCount = 0;
+$(document).ready(function() {
+ $("#uploadify").uploadify({
+ 'uploader' : '<?php echo $modx->config['base_url']?>assets/modules/uploadify/jquery.uploadify-v2.1.0/uploadify.swf',
+ 'script' : '<?php echo $modx->config['base_url']?>assets/modules/uploadify/uploadify.php',
+ 'cancelImg' : '<?php echo $modx->config['base_url']?>assets/modules/uploadify/jquery.uploadify-v2.1.0/cancel.png',
+ 'folder' : '<?php echo $modx->config['base_url']?><?php echo substr($startpath, $len, strlen($startpath))=='' ? '/' : substr($startpath, $len, strlen($startpath))?>',
+ 'queueID' : 'fileQueue',
+ 'auto' : true,
+ 'multi' : true,
+ 'onSelectOnce' : function(e, data) { fileCount = data.fileCount; },
+ 'onAllComplete' : function(e, data) { if(data.filesUploaded == fileCount) setTimeout('location=location',500); }
+ });
+});
+</script>
+<div id="fileQueue"></div><input type="file" name="uploadify" id="uploadify" />
+
+<form enctype="multipart/form-data" action="index.php?a=31" method="post" style="display:none">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo isset($upload_maxsize)? $upload_maxsize:1048576; ?>">
<input type="hidden" name="path" value="<?php echo $startpath?>">
If you want to try, just extract attached file to your modx folder and you will be able to download as many files at once as you want.