We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • The new Rich Text editors are comprised of MANY files. As such, uploading takes a lot longer than I’d like to see it take.

    Does anyone have know of or have a cross-platform code based that we could use in an installer to uncompress files and recreate directory trees. Other suggestions?

    Thanks.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 19726
      • 239 Posts
      I thought PHP had some zip/compress functions.
      Isn’t that how the unzipping in the MODx filemanager works?
      • Maybe this would be useful?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
        • Thanks Susan. In my brief review of the code and the associated notes at php.net of some of the bzipcreate, zip_create, etc. functions at php.net, it seems like there are no external file dependencies. That’s great! The only gotcha is that handling some of the file types requires PHP 4.3 and above (which should almost be a requirement at this point I think).
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 4018
            • 1,131 Posts
            Well...we could probably find some way of integrating some zip/tar features into the file manager. Honestly, it’s probably a longshot to try and integrate something like this into the editors themselves. Unless the devs for FCKeditor, TinyMCE, and Xinha are working on something like this, I think it’s probably alot safer to do it with the file manager. Better to keep something like this in one spot rather than isolated to a particular editor. Just a thought. I haven’t looked hard at the code for the file manager...but I’m sure it could be done without too much fuss. I’ve seen this sort of functionality before with a few PHP apps so...it’s definitely possible. smiley
              Jeff Whitfield

              "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
            • My thoughts on this is for an installer application, so you’re not transferring thousands of files across the net.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 4018
                • 1,131 Posts
                Ah...well...that changes things. Heh heh...silly me, didn’t read the first message right. Yeah, that’s definitely a possibility. Of course we’ll likely have to rely a bit on certain modules being present in the PHP configuration...probably the zip and zlib modules I’m guessing. It could probably be done with just the Install directory and an archive file being present. As long as the user has uploaded the files on their server and made sure that the directory they are in have write permissions, I don’t see how this couldn’t be possible. I’ll have a gander at some scripts that can do this sort of thing. I like the idea! smiley

                Jeff

                Quote from: rthrash at Jun 22, 2005, 02:21 PM

                My thoughts on this is for an installer application, so you’re not transferring thousands of files across the net.
                  Jeff Whitfield

                  "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                  • 8634
                  • 56 Posts
                  I was wondering how Xoops managed to do it, for e.g. modules, etc. as they allow zip files.
                    • 4673
                    • 577 Posts
                    Can’t you use .bin files?

                    They’re a bit bulky but contain the actual bin file and when you "unzip" the bin it puts all the files in the right places.

                    Only problem I’ve seen on this in perl was that the server now owned the file and made it a problem to erase the buggers later.
                      Tangent-Warrior smiley
                      • 4018
                      • 1,131 Posts
                      Zip files are probably the way to go. Both Xoops and Mambo use zip files to install modules, plugins and the like. We could probably integrate this concept into the installer. Plus, perhaps we could integrate the installation of plugins in a similar fashion. You never know...possibilities are endless when it comes to functionality like this. smiley
                        Jeff Whitfield

                        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."