Sorting Views by Download Count
koro - September 26, 2007 - 07:31
| Project: | download_count |
| Version: | 6.x-1.3 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
I was hoping that the download_count module would allow me to add a sort criteria for my views to sort them by download counts (number of downloads); however, I cannot figure out how to add download counts as a criteria to sort my views. Has anyone been able to filter or sort their views by the number of downloads? It would be very useful for showing which downloads are the most popular, not by node views, but by the number of actual downloads.
Thanks!

#1
This is next on my list.
#2
Tracking.
#3
Hi!
I made some modifications on this module to fit my needs, I hope this help.
As I don't have familiarity with CVS tools, I will attach a zip with all sources, instead of a path file.
Regards,
André
#4
Can you please tell me what version this is changed against? I ask because I'm looking to apply the CCK patch as well, and I need to know what you started with for this (6.x-1.3 release, 6.x-1.x-dev, or CVS)(I see that it's 6.x-1.3 5.27.2009)BTW, a patch file is made by running "diff" - e.g.:
diff -up path/to/file/example.module path/to/file/exampleNew.module > mypatchname.patch(See: http://drupal.org/patch/create - there are also user comments on patch and diff there as well)
Once you generate a patch you should check that it works by applying it to your original:
patch -p0 < path/file.patch...and then test your new module.Note - the file to be patched is specified inside the patch file -- that's why you don't see your module file in that command. So let's say you ran the diff on two files in the local directory without specifying any path; then place the patch file in the same dir as the file(s) to be patched, and while in that folder run the above patch command. Or if you were in a parent directory and ran diff on files in separate subdir's, then do the same again for patch. And so on.
Also, if you're doing anything on a windoze box then make sure your end-of-line char's are not ^M's by using a unix style text editor (textpad for example) and/or running dos2unix on any files you modify before you diff or patch.