We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30269
    • 119 Posts
    I have same issue and also could not get my counter working yet.

    More important now: Deleting a file works as a charm, but when trying to delete a file form a subdirectory, I get:

    PHP error debug
    Error: array_values(): The argument should be an array
    Error type/ Nr.: Warning - 2
    File: /vhosts/sunhorse.nl/httpdocs/assets/snippets/filedownload/filedownload.class.inc.php
    Line: 263
    Line 263 source: $values = array_values($v)
      • 30277
      • 75 Posts
      Hi

      As i am a noob so sure i couldnt make it work and need help please

      I created a doc named downloads
      Since iam using friendly urls and seooverride my site structure is like site.com/downloads/ and this page has links to sub categories, i want my visitors reach files like site.com/downloads/dir-1/something.zip but when i go my downloads page all i can see index of files.

      I installed FileDownload 2.5 on my modx 9.0.6 , followed the Instructions
      I tryed to install FileDownloadPlugin but couldnt create a tv its probably i dont know what to adjust,type in it.

      I have no idea what iam doing please help
        • 29181
        • 480 Posts
        Hi,

        using &dateFormat I can get my date formatted in the exact way I want....

        How would I go about doing that with a multi-lingual site? I checked out the PHP manual (seemed like a good idea beyonds as how I’m clueless) and it says I should use setlocale() and strftime instead of date()

        Can anyone tell me how I can use that information to acheive my aim? huh

        Thanks for any pointers,

        Taff
          Adrian Lawley: www.adrianlawley.com
          • 33337
          • 3,975 Posts
          Quote from: Tom at Apr 27, 2007, 05:17 AM

          More important now: Deleting a file works as a charm, but when trying to delete a file form a subdirectory, I get:

          PHP error debug
          Error: array_values(): The argument should be an array
          Error type/ Nr.: Warning - 2
          File: /site/httpdocs/assets/snippets/filedownload/filedownload.class.inc.php
          Line: 263
          Line 263 source: $values = array_values($v)


          I am having the same problem too. I am using:

          Filedownload snippet 2.5 beta with FileDownload Plugin 1.2

          MODx 096 on LAMP with Apache 1.3.x Server API CGI/FastCGI, PHP 4.4.7, MYSQL 4.1.x

          Additionally adding a debug line in the class file gave me this on top of MODx error:
          Array (     [0] => The path specified is not a directory: files/clients/name/MDgtMDctMjAwNw== )
          


          Any fixes?

          Thanks.
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 23050
            • 1,842 Posts
            Hi,

            I try to achieve something but it seems that it’s not possible. Can anyone tell me if what I want is possible or not ?

            I have a download page managed by FileDownload v2.5. I would like to enable couting so I installed FileDownloadPlugin 1.2. But, as I use friendly alias path (for trafic stats purpose), i can’t use the Rewrite Rule needed by FileDownloadPlugin (RewriteRule ^([^/]*)/?(.*)$ index.php?q=$1&d=$2 [L,QSA])

            So, is there an other way to enable counting without using FileDownloadPlugin ? Or, at least, without using the url rewriting made by FileDownloadPlugin ?
            I don’t care showing up the full url of files.. the only thing I need is couting smiley

            Thx !
              • 22303 MODX Staff
              • 10,725 Posts
              Perrine:

              See if this is helpful.
                • 23050
                • 1,842 Posts
                Yes ! Perfect Jason. Thanks a lot wink
                  • 23050
                  • 1,842 Posts
                  Quote from: pixelchutes at Feb 16, 2007, 06:07 PM

                  Hmm... so if using the Plugin Method, is there not a way to "Force Download" out of the box?

                  Basically, I’m having them download a MP3 file, but I don’t want it to load in their browser, etc... I’ve used forced dialogs before through modifying the headers/cache/content type etc, ... has anyone done something similar within MODx / FileDownloadPlugin?

                  Mike, don’t know if my answer comes too late but I’ve managed to force download by removing li 65 to 125 fromFileDownloadPlugin (1.2) (I don’t check anymore what type of file it is) and I changed li 187
                  header("Content-Type: $type");

                  into
                  header("Content-Type: application/force-download");


                  Anyone can tell me if these changes are good ?

                  .swf are still opened in the browser... and some .wmv too... some others not :/ Very strange.
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Quote from: Perrine at Aug 28, 2007, 12:18 PM

                    .swf are still opened in the browser... and some .wmv too... some others not :/ Very strange.
                    This may have to do with your browser settings.
                      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
                      • 23050
                      • 1,842 Posts
                      Yes... it depends on the browser. With IE6, .bmp are opened in Paint when using header("Content-Type: application/force-download"); whereas there are opened in the browser with Firefox.
                      No matter... wink

                      I have an other question about [+fd.description+]

                      When not using FileDownloadPlugin, path to files looks like : http://www.domain.tld/path_to_file/file.zip
                      Thus, if my description chunk is
                      path_to_file/file.zip|text for desc.||

                      the description shows up fine.

                      But, when using FileDownloadPlugin, path to files looks like : http://www.domain.tld/my_webpage.html&file.zip
                      Then, it seems that description is not found.

                      I tried to use
                      file.zip|text for desc.||

                      my_webpage.html&file.zip|text for desc.||

                      But nothing shows up.

                      Anyone noticed the same issue ?

                      Thx wink