We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    Quote from: gouvernante at Nov 22, 2006, 07:19 AM

    If I take all blanks out of the snippet call, it works (just don’t know why grin).

    what do you mean, take the blanks out?
      • 8471
      • 333 Posts
      Hi, I have a problem with the new version of FileDownload.
      This is my call: [!FileDownload?getFolder=`download` &chkDesc=`fileinfo` &tplList=`FileDownload` &downloadCount=`1` &sortOrder=`desc` &browseDirectories=`1` &imgLocat=`assets/snippets/filedownload/images/` &imgTypes=`fdImages` &firstFolderCss=`fd-firstfolder` &lastFolderCss=`fd-lastfolder` &firstFileCss=`fd-firstfile` &lastFileCss=`fd-lastfile` &skipTableCheck=`1` !]
      I have use the template of this page: http://www.muddydogpaws.com/notebook/filedownload-rewrite/example-4.html
      But i can’t see the description of files which I have in the fileinfo chunk, and I can’t browse inside my folders! If I select a folder doesn’t happen anything.
      I’m using MODx 0.9.2.2.
      Thanks to all.
        Sorry for my bad English grin
        • 15987
        • 786 Posts
        edipo, is this a public site I can look at? I’m not sure why the directory browsing would not work

        For the descriptions, you need to add the placeholder [+fd.description+] to the template chunk. So maybe something like this:

        <div[+fd.class+]><img src="[+fd.image+]"/><a href="[+fd.link+]">[+fd.filename+]</a>
                        <span class="fdexp-info">[+fd.count+] downloads :: [+fd.sizetext+] :: [+fd.date+] :: [+fd.description+]</span>
        </div>
        
          • 8471
          • 333 Posts
          Thanks kylej I have forgot to add the placeholder and I have forgot to set the page uncached...
          Now it works well
            Sorry for my bad English grin
            • 8471
            • 333 Posts
            now I have a very strange problem... all my zip files downloaded from this snippet result damaged! But if I go on the server the files are OK.
              Sorry for my bad English grin
              • 11159
              • 11 Posts
              Quote from: kylej at Nov 22, 2006, 11:26 AM
              Quote from: gouvernante at Nov 22, 2006, 07:19 AM
              If I take all blanks out of the snippet call, it works (just don’t know why grin).
              what do you mean, take the blanks out?
              Well, my call looks like this now (without these ``):
              [!FileDownload?getFolder=`download`&tplList=`FileDownload`&downloadCount=`1`&sortOrder=`desc`&browseDirectories=`1`!]
                Greetz,
                gouvernante
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I have also occasionally had a snippet fail if I had spaces between the options. That was an older version of eForm. Still not sure what was going on.
                  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
                  • 10357
                  • 573 Posts
                  this is a really great snippet and documentation, thank you grin

                  is there a way to change how the date is formatted?

                  cheers,
                  g
                    • 15987
                    • 786 Posts
                    You would have to go int othe code to change the date format, there is no settings to change it. I will keep this in mind for future updates.
                      • 10357
                      • 573 Posts
                      Thanks, the way ditto handles the date works really well. grin

                      How do i get the text file that counts downloads to format correctly? I am just opening it in notepad and the line returns are not respected. I just get a long stream of words.