Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[UX] Default comment timestamp
A new install drops the default article in place, and tacks on Donald’s comment. Right now, Donald’s comment is added 1 hour after the timestamp of the article, using now() + interval 1 hour
in txpsql.php. In 4.5.7, it’s been switched back to a static date in 2005. Oops.
After a new installation, especially for a new user, it’s likely that one of the first things that happens is a sanity check that all is working – including the front-end. If an install takes place at 12:00:00 (arbitrary time), the comment is labelled as 13:00:00 – which is in the future. It’s not possible to add post-dated comments, whereas it is possible to post-date articles. This would remove some uncertainty (‘Is my server clock correct?’) and not publish something that actually hasn’t happened yet.
Solution: switch the default comment to a small number of seconds after the article is published.
I can raise a PR for this – OK to proceed?
Offline
Re: [UX] Default comment timestamp
Sure, go for it. An oversight I’d not considered.
While you’re at it, you should prepend the comment text with First!!!1 since Donald will clearly be pleased with himself for posting a comment mere seconds after it was published :-p
Alternatively, alter the article timestamp to install time - 1 hour
and set the comment now()
.
Note to self: tend to the back-porting SVN issue 427 sometime this millennia.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: [UX] Default comment timestamp
Bloke wrote #285319:
Alternatively, alter the article timestamp to
install time - 1 hour
and set the commentnow()
.
‘Is my server clock correct?’
I’ll see how Wordpress handles it. To be continued.
Offline
Re: [UX] Default comment timestamp
Done: #453
Last edited by gaekwad (2014-11-01 14:08:44)
Offline
Pages: 1