Woke up yesterday morning and had a thought while I was on my way to the bathroom: timed publishing doesn't need to be Cron-based. Just set a date on the post and display that post if the current date/time is past it.
It seems I got somewhat fixated on the whole Cron job method of allowing posts to go live based on a set date and time that the obvious non-scheduled way of doing things just passed me by.
I spent yesterday getting the feature in and made it live. Posts are now displayed based in their (newly added) published_at
column rather than created_at
. Of course I had huge amounts of fun with timezones. sigh
I gave the site a quick test on mobile after someone mentioned it doesn't work. Seems it's just a minor formatting issue, at least on Android Chrome, involving the quote in the header at the top of the page. I'll probably just not display it on mobile browsers; presumably there's a mobile
substring in the User-Agent
header.
Didn't quite get around to sorting out the categories display (click on a category at the top of this post) and so viewing a category right now doesn't work quite how you'd expect. I probably should've gone with keywords rather than rigid main and sub categories.
Finally, I added a set of badges to posts so I can see at-a-glance if any specific flags are set rather than having to rely on remembering what their background colours denote.