Using the Views module, it's already possible to create views where nodes are sorted by number of comments or views. But, what if I want to sort by the number of comments or views from the last N days, i.e. only comments or views from the last N days will be counted? Is there a module I can use? Is there some complicated coding to do?

Comments

stormlifterNET’s picture

I was wondering the same thing.
Also wait, how do you sort by number of views? I don't see anything to do that.

Anyone figure out how to do "number of views from last N days"

MidGe48’s picture

I think you may find that when you are developing a view of type Node and you go to add fields in your view, there are quite a number of options including those that you require.

Node statistics: Most recent view
The most recent time the node has been viewed.
Node statistics: Total views
The total number of times the node has been viewed.
Node statistics: Views today
The total number of times the node has been viewed today.
Node: Comment count
The number of comments a node has.

etc...

An Access Log type of view may do what you want too. Checkout the fields available and then filter your view.

www.ZuNOB.com

stormlifterNET’s picture

Well ah, ha.... Statistics module needs to be turned on.
Now I'm getting somewhere.

Thank you.

robato’s picture

So does anyone know a solution to the original poster question? I would like to know as well.