Hello,

With views you can create a block that displays the most viewed pages for today and the total.
But is it possible to show the most viewed nodes from the passed week ?

Thx

Comments

bubsy119’s picture

Nobody that can tell if it's possible or not ?

redrider’s picture

You can do that with the statistics module.
It has the capability to keep the stats for all the nodes and create a block to display whatever stats you wish in one of the side bars.

I'm no Drupal expert but I am doing this on one of my sites.

bubsy119’s picture

Do you mean the statistics module that comes with the drupal core or a other module ?

I have the statistics module from drupal core enabled en with views i can build 2 different blocks : today count en all count.
But i don't see any option to create the counts from the past 7days?

redrider’s picture

Yes - the one with Drupal core.
I'm don't believe it count past activity, only from the time you enabled it - or something like that.

sylvaticus’s picture

did u find a way? I need the same thing - e.g. the most view "Article" nodes of June 2010.. and there isn't anything I found that does that.

hedley’s picture

I was looking for this functionality as well, the core statistics module just increments a counter every time a node is viewed, so it can't do this.

A module could be written (or maybe it has been written but I haven't found it) using the access log to count the number of times a node has been accessed within a given date range but this could take a lot of resources to perform this query constantly, especially on larger sites. Some kind of caching mechanism for this could help.

On my site I've decided just to filter the nodes in the view by the creation date, so I'm displaying the 5 most popular nodes which were created within the last month which works fine for me.