We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    Roc,
    Thanks for the update, I will give it a good look over when I get the chance, and update the inital post so the most current version is there.

    I agree about the alt image being blank, it really had no purpose before.

    Thanks,
    Kyle
      • 8471
      • 333 Posts
      Hi anybody can give me a nice CSS for using this snippet? (I’m a newbie)
        Sorry for my bad English grin
      • FYI, i fixed the link in your first post to your site Kyle. Great work my man! laugh
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 15987
          • 786 Posts
          Edipo, here is what I use for my site. (http://www.muddydogpaws.com/notebook/file-download-snippet)

          Here is the snippet call:

          [!FileDownload?getFolder=`[*filespath*]` &chkDesc=`fileinfo` &tplList=`FileDownload` &downloadCount=`1` &userSort=`type` &sortOrder=`desc` &imgLocat=`/assets/images/filetype`!]


          Here is the chunk I use to format each download:

          <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>
          


          And here is the css I use to format it:

          .downloads{
            position: relative;
            width: 232px;
            overflow: hidden;
            margin: 8px auto;
            border: 1px solid #ccc;
            background-color:#fff;
          }
          .file{
            margin-left: 5px;
            margin-bottom:8px;
          }
          .file span {
            font-size: 80%;
          }
          .file a {
            font-weight: bold;
          }
          



          And thats it.

          Here is another example using a table layout:

          Here is the snippet call:

          [!FileDownload?getFolder=`assets/coda/sitefile` &tplList=`FileManagement` &useHlt=`1` &evenClass=`evenrow` &oddClass=`oddrow` &imgLocat=`assets/templates/coda/images/filetype` &deleteGroups=`admin` &downloadCount=`1`!]


          Here is the css to style it:

          div.downloads { border: solid 1px #ccc; padding: 10px 5px}
          table.tbldwn { width:100%; border: solid 1px #ccc; }
          table.tbldwn td,tr {padding: 5px 0px 5px 10px;}
          tr.oddrow { background-color: #eee; }
          tr.evenrow { background-color: #fff;}
          tr.dwnhead { background-color: #557cfd; color: #fff; text-align: center; font-size: 120%}
          tr.descrip { border-bottom: 1px dotted #ccc;}
          


          Let me know if that helps or you need more info.


          Quote from: rthrash at Apr 27, 2006, 02:24 PM

          FYI, i fixed the link in your first post to your site Kyle. Great work my man! laugh

          Ryan, thanks for fixing that, I didnt even notice it was wrong:)
            • 8471
            • 333 Posts
            Thanks a lot kylej ! FileDownload is a great snippet! laugh

            Maybe this post should be added to the first post wink
              Sorry for my bad English grin
              • 15987
              • 786 Posts
              Thanks edipo, I’m glad it helped.

              I have put a link to the style post from the first post so it will be easy for others to find.

              Kyle
                • 6726
                • 7,075 Posts
                Quote from: kylej at Apr 27, 2006, 03:28 PM
                Edipo, here is what I use for my site. (http://www.muddydogpaws.com/notebook/file-download-snippet)

                Ditto, thanks for the code Kyle, helpful and a time-saver smiley
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                  • 15987
                  • 786 Posts
                  Quote from: kylej at Feb 28, 2006, 05:19 PM


                  To see the directory browsing feature go here:

                  http://www.muddydogpaws.com/download-test


                  *******Update: 05/01/06**********
                  I have updated the code to include the directory browsing posted by Roc. I modified the code a little so that it works with the download counting as well. I also cleaned up my code to make things hopefully a little faster. The new zip is attached below with full instuctions in the readme.



                  Here is the latest update (Download is in the first post). Thanks Roc for the directory browsing laugh

                  Kyle
                    • 8471
                    • 333 Posts
                    Hi, I have created a sub folder in my download folder and I have set &browseDirectories=`true` but when I try to enter in the subfolder I receive this parse error:
                    « MODx Parse Error »
                    MODx encountered the following error while attempting to parse the requested resource: 
                    « ID passed in request is NaN! » 
                      
                    Parser timing 
                      MySQL:  0.0000 s s (0 Requests) 
                      PHP:  0.3138 s s   
                      Total:  0.3138 s s   
                    

                    Can you help me?
                    thanks
                      Sorry for my bad English grin
                      • 15987
                      • 786 Posts
                      edipo, can you post the snippet call you are using so I can try it with the options you are using?

                      also, have you upgraded to 0.9.2.1?

                      Thanks,
                      Kyle