We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    David,
    Check to see if the file data.db.class.inc.php was uploaded into the filedownload folder. Looks like it isnt finding it and that might be what is causing the error. If it is there try reuploading it, maybe the whole file didn’t make it.

    Kyle
      • 6726
      • 7,075 Posts
      Though I tried to upload the whole directory twice already, maybe coincidence, I’ll try again and report.
      Thanks Kyle for the quick answer smiley
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It’s also possible that the line endings in the file got lost in the upload, this would make any single-line comments suddenly commenting out the rest of the entire file! I’ve had this happen from time to time, although more commonly with js files than php files.
          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
          • 6726
          • 7,075 Posts
          Thanks for the tip Susan, I would never have thought of that.
          I didn’t get the chance to check this out again yet, but I will and also will report...
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Pagination...please?

            I’m working on it myself, but if you decide to do something about it before I’m successful I won’t complain!
              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
              • 22279
              • 10 Posts
              @kylej:

              Hi, I’ve created FileDownloadPlugin that is supposed to be a supplement to your snippet having full large files HTTP support and document privileges respect, please have a look:
              http://modxcms.com/forums/index.php/topic,9276.msg64453.html#msg64453

              I’m attaching there also modified version of your snippet scripts that works with my plugin.

              Feel free to also to transfer the download code from my plugin to your "download.php", I believe it has many interesting improvements.

              Many thanks for your snippet and inspiration cool
                • 3006
                • 32 Posts
                Hi,

                Thx for a great snippet. Although, I was wondering something. Is it possible to use friendly URL’s on this snippet somehow? Cause now, all download links are domain.xx/modx/assets/snippets/filedownload/download.php i want the links to look more like domain.xx/modx/download.php?xxx

                Thanks,
                Björn
                  • 11159
                  • 11 Posts
                  I have tried to install your snippet, but I only get

                  PHP error debug
                    Error:	array_values() [function.array-values]: The argument should be an array	 
                    Error type/ Nr.:	Warning - 2	 
                    File:	/home/www/*****/html/modx/assets/snippets/filedownload/filedownload.class.inc.php	 
                    Line:	255	 
                    Line 255 source:	 $values = array_values($v);

                  as response.

                  FileDownload 2.0 ModX 0.9.2.2

                  Any ideas (careful, beginner!)
                  Thankx,

                  gouvernante
                    Greetz,
                    gouvernante
                    • 15987
                    • 786 Posts
                    Quote from: OnO at Nov 18, 2006, 11:35 AM

                    Feel free to also to transfer the download code from my plugin to your "download.php", I believe it has many interesting improvements.

                    Thanks for the updates. I will give these a good look over and see about integrating it all into my snippet. I am a little swammped with some other things I am working on but will definatly get to this soon.

                    @beejay - if you want, you can move the download.php file to anywhere on your server, then change the paramter &download to the location of the file. For instance if you move the download.php file to domain.xx/modx/download.php set the parameter &download=`modx/download.php`

                    @gouvernante - can you give me some more information on your snippet call? Looks like it might not be getting any files or something?
                      • 11159
                      • 11 Posts
                      If I take all blanks out of the snippet call, it works (just don’t know why grin).
                        Greetz,
                        gouvernante