Node creation dates (and parts of it such as year, month, day, monthwithyear ...) can be used as arguments in Views, so I can create a beautiful view (I can't say how much I love this module :-) that will give me something like this:

posts --> list of all the posts
posts/dates ---> list of all years with posts
posts/dates/2009 ---> display all the post in a year (and an attachment letting me choose months of that year with posts)
posts/dates/2009/01 --> display all the posts in that month (and an attachment letting me choose days of that month with posts)
posts/dates/2009/01/12 --> display all the posts in that day

What I cannot get is the same with comments (i.e., lists of comments by date):

comments/dates/[YYYY]/[MM]/[DD]

The key thing is dates of creation (in its diverse forms) are not available as arguments for comments, so there is no way you can split comments by date.

I think that would be very useful, but wanted to know OPPs opinion. I am no coder, so I cannot foresee how hard or easy to implement this would be. However, the same is implemented for nodes already, so I hope that is at least a base.

Thanks!

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new6.83 KB

this is a first patch which should solve this issue

TODO: provide this kind of stuff for every timestamp field

merlinofchaos’s picture

Is there any need to copy the node_created classes? The code didn't change, right? We could just use them and declare them misnamed.

dawehner’s picture

yes the code is exactly the same

so there has to be a abstract class foreach kind of handlers(month/day/week...)?

i'm not very familiar with OOP

merlinofchaos’s picture

Only for historical reasons. If you can reroll the patch to just use the existing ones, we can declare them misnamed and move on from there. Changing the names risks breaking things so we'll live with incorrect names.

merlinofchaos’s picture

Status: Needs review » Needs work

Still needs a reroll.

lonelyrobot’s picture

Version: 6.x-2.3 » 6.x-2.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.14 KB

Reroll of the patch to just use the existing argument handlers.

merlinofchaos’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Status: Needs review » Fixed

Applied to the 3.x branch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.