We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39969
    • 5 Posts
    For everyone who can't use php zip extension, here's the solution for unzipping archives in file manager:

    1. download attached Zip.php file and upload it to /manager/includes folder

    2. replace default unzip function in /manager/actions/files.dynamic.php with the following code:
    if ($enablefileunzip && $_REQUEST['mode']=='unzip' && is_writable($startpath)){
        require_once "Zip.php";
        if (file_exists(realpath("$startpath/".$_REQUEST['file']))) {
            $obj = new Archive_Zip(realpath("$startpath/".$_REQUEST['file'])); // name of zip file
        } else {
            die(' rtztr '.$file);
        }
        $papaparam['add_path'] = realpath($startpath);
        if(!$obj->extract($papaparam)) { 
            echo '<span class="warning"><b>'.$_lang['file_unzip_fail'].($err===0? 'Missing library (Zip.php)':'').'</b></span>
    
    ';
        } else {
            echo '<span class="success"><b>'.$_lang['file_unzip'].'</b></span>
    
    ';
        }
    }


    That's it! Now you can upload larger amounts of files in one .zip archive and extract it from file manager.
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Awesome, have you considered filing this as a feature request? It would be awesome to have this built into MODX.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 39969
        • 5 Posts
        This is not a feature, it's more like solution for those who can't use new zip extension and I don't think I'll fill that because used zip extension is old beta version and is not maintained any more. More about it: http://pear.php.net/package/Archive_Zip/