We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    Great Snippet!
    Thanks for the effort.

    few Q’s:

    1. can I steal your images from muddydogpaws.com?

    2. I’m not sure about the location of the template CSS examples from here. Is this going in my main template file (style.css ) or somewhere else?
    can I somehow include my css in a chunk so I can edit it from the Manager?

    3. I can’t get rid of the underline for file names, I tried this code with no luck:

            <tr>
    		<td><img src="[+fd.image+]"/></td>
    		<td><span style="text-align:left; color:white">[+fd.filename+]</span></td>
    		<td><span style="text-align:right; padding:10px">[+fd.sizetext+]</span></td>
    		<td><span style="font-size:80%">([+fd.count+] downloads)  </span></td>
    		<td><span style="text-decoration:none"><a href="[+fd.link+]">{{downloadicon}} Download</a></span></td>
    		<td>[+fd.date+]</td>
                          
    	</tr>
    


    thanks for any input smiley

      • 15987
      • 786 Posts
      can I steal your images from muddydogpaws.com?

      what images? If you want the ones for each filetype, they are from the silk icon set you can get it here: http://www.famfamfam.com/lab/icons/silk/

      I’m not sure about the location of the template CSS examples from here. Is this going in my main template file (style.css ) or somewhere else?

      You can put it in your main template file, or you can create a separate css file, its really up to you.

      can I somehow include my css in a chunk so I can edit it from the Manager?

      If you want it in a chunk, you would probably need to add in the <style> </style> around it and then call the chunk in the page header somewhere. I have not tried this so am not sure if it will work.

      I can’t get rid of the underline for file names, I tried this code with no luck:

      add the text-decoration:none to the <a> tag and not the span.
        • 27330
        • 884 Posts
        Kyle thanks alot.
        this solves all my problems smiley
        looks sweet now.
          • 23699
          • 14 Posts
          I installed the Plugin and this snippet.
          In my document I use:

          [!FileDownload? &getFolder=`assets/files/downloads` &getFile=`soundosd-1.0.zip` &tplList=`filedownload`!]

          I see the download but it links direktly to the file and so it won’t be counted.
          On the example website th download linklooks like:
          ..../document.html?d=file.zip

          What do I have to do to make this working?
          • This one puzzled me the other day for a while as well - you need to configure the plugin by the looks of it, follow the Install Instructions on this page:
            http://www.muddydogpaws.com/notebook/filedownload-2.5.html&d=about.html
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 15987
              • 786 Posts
              you also should have a tv named FileDownloadFolder with the path you are using in the getFolder parameter. If you are using the plugin you do not need to set the getFolder parameter since it is handled by the tv.
                • 23699
                • 14 Posts
                Thanks, it works now.
                I used the instructions from here and here

                But now theres another problem.
                I use friendly URLs but this doesn’t work with FileDownload for me (cause I don’t have MODx in the domain root dir, I believe)
                I modified line 52 in filedownload.class.inc.php:

                $this->_config[’urlsetting’] = ’&’;   #$modx->config[’friendly_urls’] ? ’?’ : ’&’ ;

                but the download link is still doc.html/file.zip and not doc.html?d=file.zip

                Do you know how to change it?


                EDIT:
                sorry, my fault.
                Works now!
                  • 28792
                  • 7 Posts
                  I’m a noob with php and modx so doing this was really hard. Also, the directions for file download are not meant for beginners at all. But anyways I am stuck with the customizing portion. If I leave the tpl at default it works fine but when I try to make my own it won’t display anything at all.

                  Here is what I want the download section to look like.


                  Now here is the tpl chunk and parameters.


                  Here is what it looks like after I put in the tpl chunk.


                  So how come when I use the (&tplList=`filedownload`) it won’t display anything but when I remove it, everything works.

                  Here is what it looks like if I leave it at default.


                  I am trying to accomplish a file list using directory, (assets/files/templates/). I want to be able to have a thumbnail for each file, a description and a way to add comments for that file. Right now I am trying to figure out how to get it to look the way I want it to. Any help is appreciated, thanks.
                  • Could you post your chunk HTML in a format that is copyable - it will be easier to snag issues if people can try out the code themselves without having to manually type it in from a screenshot. wink
                      Garry Nutting
                      Senior Developer
                      MODX, LLC

                      Email: [email protected]
                      Twitter: @garryn
                      Web: modx.com
                      • 15987
                      • 786 Posts
                      its because you removed the splitter from your template. look at the original template and add in the following splitter in the correct places. The splitter is used to differentiate the different parts of the template.

                      <!-- Fd:Splitter -->

                      from the documentation:

                      The templating for filedownload is all handled with one chunk. This chunk is split into seven sections: header, parent, folder, file, delete link, group by, and footer. All of these sections should be in the chunk template even if they are not all being used or it will not be processed correctly.