Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
What about putting a download count beside the various versions. I would be curious to know how many times my module had been downloaded.
Ron.
Comment | File | Size | Author |
---|---|---|---|
#1 | release_dlcounter_0.patch | 4.58 KB | buchanae |
Comments
Comment #1
buchanae CreditAttribution: buchanae commentedI wrote this simple click-thru release download counter patch for a repository site I am building, and I am submitting it for comments, additions, questions, and blasphemous remarks :) Please feel free to tear it apart if it can be done in a better way.
A summary of what I did:
1. Changed the code that generates the link to the extension download file to point to an intermediary page called "dlcounter/node_number" instead of "files/filename"
2. Registered the page "dlcounter/node_number" to a callback handler function
3. Created the callback handler function. this function increments the download count in the database and redirects the page to the actual file
4. Modified the install and update database schema profiles to add the extra download count field to the project_release_nodes table
5. Added a download count message to project release pages
If you go to a release node, you will see a download count. I will be adding a default view for most downloads per project, and any settings that seem critical.
Thank you!
buchanae
Comment #2
bloomaniac CreditAttribution: bloomaniac commented+1; I like this
Comment #3
njkt CreditAttribution: njkt commentedIf you use the module "Download Counter" I wrote 2 patches for this sort of thing,
http://drupal.org/node/131342
Comment #4
dwwthanks, but this is duplicate. let's move discussion back into the original issue: http://drupal.org/node/32124