Closed (duplicate)
Project:
Project
Version:
5.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2006 at 02:16 UTC
Updated:
18 Apr 2007 at 23:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
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 commented+1; I like this
Comment #3
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