Don't know if it is possible, but it'd be cool if you could add a sortable column in the download center area which gives the average interval between downloads. I have some files that have been online for a year or so and have thousands of downloads, where others have only been online for a matter of days with very few downloads. With an average time between downloads value it gives you a better idea of what is popular at that time.

Another thing would be to display the download count next to the file attachment in the node, but I think this was planned anyway?

Comments

Chill35’s picture

Title: Downloaded every x minutes statstic? » Downloaded every x minutes statistic?

Great suggestions. Keep them coming.

Chill35’s picture

Assigned: Unassigned » Chill35

I started to work on the stats in nodes. It works well, except I would love to merge the info with the attachments table, and I haven't figured this out yet. So far, there are 2 tables at the bottom of the node body. There is access control there too : you can see only stats on nodes you have authored, OR on all nodes with attachments, OR on no nodes at all. I have to add an admin settings though because the admin may or may not want to see the stats in nodes... mmm...

brashquido’s picture

Sounds promising. I agree that merging the download count alue with the attachment table would be ideal, can't offer any help on how to do that unfortunately. Looking forward to seeing what you come up with :)

Chill35’s picture

Ok I merged it all in one table. It looks very clean to me now. I updated CVS.

Left to do is STATS. And adding admin settings to turn on and off download count in nodes for the admin. (Control access gives great flexibilily for other users.)

FYI, the latest Drupal 4.7 version of the module is in HEAD : http://cvs.drupal.org/viewcvs/drupal/contributions/modules/download_coun...
While the latest Drupal 5 version is in DRUPAL 5 :
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/download_coun...

brashquido’s picture

That's awesome! I am having a few issues though.

1) If I set either the "view all downloads count in nodes" or the "view own nodes downloads count in nodes" options, then when I view a node with an attachment all the content disappears with only the attachment info displayed.

2) If I set either the "view all downloads count in nodes" or the "view own nodes downloads count in nodes" options the attachment table at the base of the node is displayed twice. Once with the attachement name, size, download count and time since last download. The other looks like just the regular attachment table with the filename and size.

You can see this in action here;

http://www.iis-aid.com/iis_aid_php_installer

As an anonymous user you can see everything as it should be as they don't have the permissions to see the download count in the node. But if you login (I setup and account for you using chill35 as username and pass) you can see that all the content except for the file attachment table has been stripped out.

Chill35’s picture

I suggest you turn this other functionality off until Friday (in access control, that is). I know what the problem is, it's just one line of code and I though I had fixed it. I will look into it now but it may be a while, i.e. 24 hours, until a new version is done and made available .

Thank you for the awesome report, you're very helpful !

Once this works, I still have to do minor changes, to make the 'count in node' functionality more robust as far as interaction with other contributed modules. If you start using the module with other contrib modules that "play" with node content (such as an image module that adds images underneath the body) and that things don't work as expected, you can probably blame my module. Some more work to do.

What other field would you like to see displayed in terms of stats ? Would you like that field to be optional ? Do you really want to see the latest interval (between downloads) or something more complicated ? Do you have a math formula you would want to see applied to evaluate popularity ? If you have ideas, let me know.

Chill35’s picture

I downloaded the module from the project page an hour ago. It looks fine fine to me. But I did see the problem once and had fixed it. Maybe it's my config -vs- yours.

1- Did you use the version for Drupal 5 ?
2- Did you use the version taken from the project page or from CVS ?

I did catch another bug though, which needs a better fix than the one I quickly put in : for people who don't have permission to 'view uploaded files', they could, in node view, NOT only see the download count if they had permission but actually download the files as well. Now (current version on CVS) they can't see any table. A better fix is to let them see download count (if they have perm) without being able to download said files (if they cannot 'view uploaded files'). I'll get to it.

brashquido’s picture

Hmm, not sure then. I took the code from the link above for 4.7 for HEAD. The file version for download_count.module is 1.8.

Chill35’s picture

I updated it again just now. The new version of the .module file is 1.9 for Drupal 4.7 in CVS. The module will get built within 24 hours.

Make sure you test the HEAD in 4.7, and DRUPAL-5 in Drupal 5. There are major differences in how the attachment table in the node is altered, the two versions use different module 'hooks'.

Here are the latest changes :

- I added admin settings so that you can actually turn off 'download count' in nodes for yourself, the admin. In these settings you can also change the title of the Download Center page, and to that same page you can add a header and footer (with the input format of your choice).

- I also added a new column to the Download Center table : a link to actually view the node to which the file is attached. If a visitor is curious about a popular file, he can click on that link to go the node where the file is attached. Then he can download the file from the node.

brashquido’s picture

Cool, I'll check it out :)

Chill35’s picture

By the way brashquido, just in case you run into this : if you visit the module settings page and you get a Page Not found, it's because of the changes I have made to the menu and the fact that Drupal caches its menu. The simple trick is simply to visit the "Menu" page, then you go back to the download_count settings page and you're ok. From then on, you're fine. Thought it was worth mentioning.

WorldFallz’s picture

closing due to new maintainer and an unsupported version. The new 2.x version will track the complete datetime of every download so this should be possible.

WorldFallz’s picture

Status: Active » Closed (won't fix)