Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-10-31 16:08:44

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

[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

#2 2014-10-31 16:31:49

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

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

#3 2014-10-31 17:27:06

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: [UX] Default comment timestamp

Bloke wrote #285319:

Alternatively, alter the article timestamp to install time - 1 hour and set the comment now().

‘Is my server clock correct?’

I’ll see how Wordpress handles it. To be continued.

Offline

#4 2014-11-01 14:08:26

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: [UX] Default comment timestamp

Done: #453

Last edited by gaekwad (2014-11-01 14:08:44)

Offline

Board footer

Powered by FluxBB