We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21112
    • 156 Posts
    I’m building a simple wallpapers site with my photography. Here’s an example page of one of the images:

    http://neilcreek.com/foamy-flow

    I would love to know how many times an image has been downloaded via some kind of counter, and display that on the page. The "download" link is simply a link to the image file, and nothing as complicated as the FileDownload snippet (which includes a counter). Also, there are three ways to link to the file on each page: the title, the thumbnail and the download button.

    Is there any way to do a simple view counter for each file which will show how many times links to it have been clicked?

    Thank you!
      • 22303 MODX Staff
      • 10,725 Posts
      You’ll need to use a traditional web statistics package because MODx does not really have a way to serve image files unless you use the FileDownload snippet/plugin or use a snippet to output the image. Otherwise, it’s all at the web server and you would need to track it there.
        • 27708 MODX Staff
        • 2,502 Posts
        You could either use the FileDownload PE (Which is what I would do) or write a simple snippet to manage the downloads by serving the file and adding a count to a table. It might be possible to add a count to a TV using a plugin too.
          Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
          • 7231
          • 4,205 Posts
          You could either use the FileDownload PE (Which is what I would do) or write a simple snippet to manage the downloads by serving the file and adding a count to a table. It might be possible to add a count to a TV using a plugin too.
          Thanks for the link to FDPE, I had forgotten about that option. Will use it today smiley
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]