Active
Project:
On This Day
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
20 Dec 2008 at 00:05 UTC
Updated:
30 Jan 2010 at 10:08 UTC
Jump to comment: Most recent file
So if a person visits a node dated January 27th, 2008, it shows nodes from January 27th, 2007 + January 27th, 2006, etc. Could be a Views argument when/if Views integration happens.
(Feature request from domesticat.)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | onthisday-349324.patch | 1.13 KB | sillygwailo |
Comments
Comment #1
domesticat commentedThis is a quick and ugly hack, but it does seem to work. Here's how I revised _onthisday_list() --
I'm sure there's probably a neater way to do it. But if not, hey, at least it works. Next I'll likely start wondering if it's worth it to tailor the block's title depending on whether it's generating lists of content for the current date ("Also posted on this day") or on an arbitrary date ("Also posted on %daynumber %monthname")
Comment #2
sillygwailoTurning this into a patch.
Comment #3
domesticat commentedI think I see something in the date calculations that I missed last night. I was confused when I looked at my On This Day block this evening and realized there were entries missing that I knew I'd written on Christmas Eve in years past. It hit me a few minutes ago: node creation timestamps are GMT, aren't they? That'd mean these calculations are looking for entries written from 00:01 GMT to 23:59 GMT. I'm six hours off from that. No wonder I'm missing entries.
Timezones are annoying sometimes.
Comment #4
sillygwailoIn the code for 6.x dev branch, I've committed this feature, i.e. the second block for "on the day of this node's creation". So after a bit of testing, this should make it into 6.x-1.1.
Addressing domesticat's last comment, I think changing the date() calls to format_date() will fix that part. I committed to the 7.x branch replacing all date() calls with format_date() and will backport if testing reveals that it works better that way.