We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    That’s probably because the file is created using UNIX style line endings, which Windows does not recognize (at any rate Notepad doesn’t). You’ll need to find a text editor that does, preferably one that can convert from one style to another.
      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
      thanks for the info.

      maybe for a future version of Filedownload is could output the download counts as a html table..
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It has that option now.
          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
          it does? the documentation says it can tracked the download in a database table, but not output a html page.

          http://www.muddydogpaws.com/notebook/filedownload-rewrite.html
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            What are you trying to do? The download count can be stored either in a database table or a text file. The placeholder will output the count from either source.
              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
              Hi,

              I just want an easy way to view the download counts. The text file is unreadable because i am on Win and I don’t want to have to trawl through phpmyadmin to view the db table.

              I know i can use the placeholder to add the counts into my download page, but I don’t want the download counts visible to visitors.

                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Make yourself a document that won’t show in the menu, or even make it unpublished and view it as a manager user that can see unpublished pages. Put the FileDownload snippet in it.
                  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
                  :-[ sorry, of course that’s what I should do! I had got it into my head that the counts would only work from the original download page.

                  thank you grin
                    • 10357
                    • 573 Posts
                    Hi,

                    I am having a problem with some of my files. It appears to be only the big ones (about 14mb), which once downloaded are corrupted/only a few kb. There is not problem downloading the files normally, so they are not corrupted on the server.

                    any ideas?

                    g.
                      • 21101
                      • 169 Posts
                      hello

                      i have a strange problem... my template chunk is not processed huh
                      i use the correct syntax i think, i’ve done this:

                      my chunk: [tt][b]chkFiles[/tt][/b] (the one in MuddyDogPaws.com)
                      <!-- This is the header template -->
                      <table>
                      	<tr[+fp.class+]><td colspan="4"><strong>Path: [+fp.path+]</strong></td></tr>
                      	<tr><th colspan="2">Filename</th><th>Filesize</th><th>Date</th></tr>
                      <!-- Fd:Splitter -->
                      <!-- This is the parent template -->
                      	<tr[+fp.class+]>
                      		<td><img src="[+fp.image+]"/></td>
                      		<td colspan="3"><a href="[+fp.link+]">Up Level</a></td>
                      	</tr>
                      <!-- Fd:Splitter -->
                      <!-- This is the folder template -->
                      	<tr[+fp.class+]>
                      		<td><img src="[+fp.image+]"/></td>
                      		<td colspan="3"><a href="[+fp.link+]">[+fp.filename+]</a></td>
                      	</tr>
                      <!-- Fd:Splitter -->
                      <!-- This is the file template -->
                      	<tr[+fp.class+]>
                      		<td><img src="[+fp.image+]"/></td>
                      		<td><a href="[+fp.link+]">[+fp.filename+]</a> <span style="font-size:80%">([+fp.count+] downloads) [+fp.delete+]</span></td>
                      		<td>[+fp.sizetext+]</td>
                      		<td>[+fp.date+]</td>
                      	</tr>
                      	<tr><td></td><td colspan="3">[+fp.description+]</td></tr>
                      <!-- Fd:Splitter -->
                      <!-- This is the delete link template -->
                      	<a href="[+fp.deletelink+]">Delete</a>
                      <!-- Fd:Splitter -->
                      <!-- This is the template used when &groupByDirectory=`1` -->
                      	<tr[+fp.class+]>
                      		<td colspan="4"><strong>[+fp.directory+]</strong></td>
                      	</tr>
                      <!-- Fd:Splitter -->
                      <!-- This is the footer template -->
                      </table>


                      I’m doing some tests, in one page, i call 2 times the snippet:

                      [tt]
                      <div class="product1">
                      <h3>Product 1</h3>
                      <p>blabla</p>
                      [!FileDownload?tplList=`chkFiles`&getFolder=`files/product1`!]
                      </div>

                      <div class="product1">
                      <h3>Product 1</h3>
                      <p>blabla</p>
                      [!FileDownload?&getFolder=`files/product1`!]
                      </div>[/tt]

                      but only the 2nd call is working... the first is not processed huh all the placeholders are empty...

                      any idea ? huh
                      thanks wink
                        Play no games