We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17815
    • 50 Posts
    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.
      • 5675
      • 120 Posts
      Pretty awesome!
      Большое спасибо, обалденная штука
        Автор благодарит алфавит за любезно предоставленные буквы
        • 17815
        • 50 Posts
        та где там,

        кстати, вот что действительно было бы не плохо так это сделать кастомное поле для рисунка с возможностью загрузки сразу нескольких рисунков, чтобы делать это все прямо при создании страницы

        но все равно спасибо

        зы: наработка довольно старая, как там она встала в свежий модх?
          • 5675
          • 120 Posts
          Влет
          Только я немного почистил мусор в папке
          http://webdev.vdzr.ru/articles/upload
            Автор благодарит алфавит за любезно предоставленные буквы
            • 18453
            • 66 Posts
            In my opinion this is the best and most useful plugin being developed for modx at this time.
            Every CMS user wants an easy way to upload multiple files.
            Especially when using photo galleries.

            A nice adition to this plugin would be to make it output the files/images with template chuncks smiley

            Great work, thanx!!
              • 8442
              • 48 Posts
              Is there any way to get this working for the uploader in the gallery snippet Revolution?

              Many thanks
                • 2798
                • 22 Posts
                Hey mac2000,

                i’m using Evo1.05 and can’t get this pretty uploadify working!!??!! Really strange, in IE8 i get an javascript-error and in FF i’m missing any upload-button!
                Do i have to create an module in Backend or just copy the folders of your zip into my modx-folders???


                Any help qould be great because i need this feature in combination with filedownload-plugin!!! I’m wondering that modx didn’t support this really useful feature by default originally!!

                thx in advance

                barneyy

                  • 5675
                  • 120 Posts
                  Doesn’t working in 1.0.5... sad
                  WOOOOOW! I find the solution!

                  attached modified "files.dynamic.php" file. Just change it
                    Автор благодарит алфавит за любезно предоставленные буквы