We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10487 MODX Staff
    • 1,535 Posts
    Sorry Ron, I wasn’t that clear, use the first set: [!xx!] and `1`

    Hmm, I’m not really sure what the issue could be, I can’t think of any Apache, PHP, or MySQL settings that would cause this to fail. Maybe could be a permissions issue? Is the file set to be writable? If it is, I’ll have to have more of a think what the problem could be ...
      Garry Nutting
      Senior Developer
      MODX, LLC

      Email: [email protected]
      Twitter: @garryn
      Web: modx.com
      • 15987
      • 786 Posts
      Edipo,
      Can you try running the snippet with just the folder as a parameter to see if it may be one of the parameters that is causing your problem. Then let me know, I’m not sure what is going on, as I can’t reproduce the error. Are you using Frul’s?

      Ron,
      Give this a try, put the following in the file: example.txt,0

      I think there may be an error if the file is blank initialy. If that works, you can remove the example after your first filename is added. If that does not work, make sure the path in the snippet to the file is set correctly. Also as Garry said see if you have the permissions set so that you can write to the file.

      Hope that helps.

      Kyle
        • 25787
        • 14 Posts
        Quote from: kylej at May 05, 2006, 06:34 PM

        Ron,
        Give this a try, put the following in the file: example.txt,0

        I think there may be an error if the file is blank initialy. If that works, you can remove the example after your first filename is added. If that does not work, make sure the path in the snippet to the file is set correctly. Also as Garry said see if you have the permissions set so that you can write to the file.

        Adding a dummy entry doesn’t seem to do anything. The path is set correctly. I’ll check the file permissions (but I think they’re set correctly).

        Ron
          • 8471
          • 333 Posts
          Quote from: kylej at May 05, 2006, 06:34 PM

          Edipo,
             Can you try running the snippet with just the folder as a parameter to see if it may be one of the parameters that is causing your problem.  Then let me know, I’m not sure what is going on, as I can’t reproduce the error.  Are you using Frul’s?
          I have tried... and I have the same error
          I don’t use furl’s

          Thank for your time kylej
            Sorry for my bad English grin
            • 15987
            • 786 Posts
            Quote from: rvdc2006 at May 05, 2006, 08:07 PM


            Adding a dummy entry doesn’t seem to do anything. The path is set correctly. I’ll check the file permissions (but I think they’re set correctly).

            Ron

            After you click on the file is it downloading correctly and just not counting, or is it not downloading as well? If it is downloading check the count file after you have clicked a link a couple times and see if it is adding anything to it.

            Also do your links look something like this:

            http://www.muddydogpaws.com/assets/snippets/filedownload/download.php?path=YXNzZXRzL2ZpbGVzL2ZpbGVkb3dubG9hZA==&fileName=FileDownload1_6.zip


            or like this:

            http://www.muddydogpaws.com/assets/coda/conupload/20medbill.fxp 


            Kyle
              • 15987
              • 786 Posts
              Quote from: edipo at May 06, 2006, 07:22 AM


              I have tried... and I have the same error
              I don’t use furl’s

              Thank for your time kylej

              Edipo,
              If you want to send me a login to your site I might be able to find what is going on by looking at it. Send me a pm, if you want me to take a look. If you switch back to the old version (if you have it) does everything work correctly? Let me know.

              Kyle
                • 15987
                • 786 Posts
                With Edipos help we have fixed an error with the directory browsing. If you do not use friendly urls it was creating the link incorrectly and causing an error to be thrown. I have updated the files in the first post with the fix.

                Kyle
                  • 33337
                  • 3,975 Posts
                  I want to use single file link display, but its giving me:

                  Path is not a directory: No Folder Specified.

                  Here is my snippet call:
                  [!FD? &getFile=`/assets/files/folder/file.zip` &tplList=`FileDownloadSingle` &downloadCount=`1`!]
                  


                  Chunk:
                  <div class='downloads'>
                  <h2>Downloads</h2>
                  <hr>
                  <div class='file'>
                  [+image+] <a href="[+link+]">[+filename+]</a>[+description+]<br/><span>Size: [+sizetext+] | Date: [+date+]<br/>Downloads: [+counter+]</span>
                  </div>
                  <hr>
                  </div>


                  I have downloaded latest version of snippet an hour ago. and I am on MODx 0.9.1.

                  What is missing here ?

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

                    Digging the interwebs for #MODX gems and bringing it to you. modx.link
                    • 15987
                    • 786 Posts
                    Zi,
                    You still need the getFolder parameter, so you snippet call should look like the following:

                    [!FD? &getFolder=`assets/files/folder` &getFile=`file.zip` &tplList=`FileDownloadSingle` &downloadCount=`1`!]
                    


                    I am going off of memory on how I coded this so if that does not work, let me know and I will look into it more.

                    Kyle

                      • 33337
                      • 3,975 Posts
                      This time it gives me:

                      « MODx Parse Error »
                      MODx encountered the following error while attempting to parse the requested resource:
                      « PHP Parse Error »
                       
                      PHP error debug
                        Error: 	Invalid argument supplied for foreach()	 
                        Error type/ Nr.: 	Warning - 2	 
                        File: 	D:\dev\xampp\htdocs\dev\zidesigns\manager\includes\document.parser.class.inc.php(695) : eval()'d code	 
                        Line: 	288	 
                       
                      Parser timing
                        MySQL: 	0.3187 s s	(11 Requests)
                        PHP: 	0.9793 s s	 
                        Total: 	1.2979 s s
                      


                      my snippet call is:
                      [!FD? &getFolder=`assets/files/templates` &getFile=`zi2.zip` &tplList=`FileDownloadSingle` &downloadCount=`1`!]


                      ???
                        Zaigham R - MODX Professional | Skype | Email | Twitter

                        Digging the interwebs for #MODX gems and bringing it to you. modx.link