Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
'Reset time to now' configuration
Not sure if this is just me and my workflow that needs modifying but if I’m writing a to-be-published-in-future article I’ll set the time and date I want, then type the article. Since future articles can be ‘read’ by someone guessing the URL and entering it manually I often set this article to ‘hidden’ while I make changes. When it gets closer to the publishing date I’ll move it from ‘hidden’ to ‘live’. Except the ‘reset time to now’ checkbox is on by default for anything that is “not live” and I’ll be damned if I remember to turn it off before hitting Save, thus my future article is published ‘now’.
Like I say, it may be me and there may be a better workflow here (any ideas?). Alternatively, is there room for adding a pref that governs whether status < 4 switches the ‘reset time to now’ checkbox on or off by default? Or, even better, some way of specifying which status codes turn the ‘reset time to now’ checkbox on? By default it could be set to ’1,2,3’ to retain current behaviour.
I think the only line that governs its state is line 352 in txp_article:
$reset_time = $publish_now = ($Status < 4);
Perhaps adding a pref select list or text box and using:
$reset_time = $publish_now = ( in_array( $Status, do_list($prefs['reset_time_status']) ) );
Another alternative might be to have a setting that inhibits viewing of future articles in the URL, rather like there’s now a setting to govern if expired articles are to be viewed? It could be on by default of course for backwards compatibility, but if set to ‘no’, future articles that are guessed by someone would return some status code (ummm, is there an HTTP code for this type of thing or is 404 correct?) That way I could leave my articles set to ‘live’, know people could not view my future content, and never be bothered by the ‘reset time to now’ checkbox flicking itself on.
Any thoughts / better ideas / rebuttals?
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
#2 2009-06-02 17:09:07
- saccade
- Plugin Author
- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: 'Reset time to now' configuration
+1
I also sometimes stumble upon “reset time to now” (as surely will my clients).
It would be a mode of ease if we could make its realm more restrictive.
Offline
Re: 'Reset time to now' configuration
+1
Offline
#4 2009-06-24 11:59:57
- terotic
- New Member
- From: Helsinki
- Registered: 2009-06-24
- Posts: 1
Re: 'Reset time to now' configuration
+1
Offline
Re: 'Reset time to now' configuration
+1
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#6 2009-06-30 16:21:09
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: 'Reset time to now' configuration
+1
Offline
#7 2009-06-30 19:27:15
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Offline
Re: 'Reset time to now' configuration
Bloke wrote:
Any thoughts / better ideas / rebuttals?
Maybe (a working version of) this?
$reset_time = $publish_now = ($Status < 4) && ($sPosted < time());
Offline
Re: 'Reset time to now' configuration
+1 !
It gets even worse when using MLP. I’m working on a site with future and back dated articles in 3 languages and MLP sets it’s article clones to ‘draft’.
If anybody has a simple hack to keep this option unchecked for all article statuses, please let me know.
kees
Last edited by kees-b (2009-07-01 07:34:09)
Offline
Re: 'Reset time to now' configuration
Are you still interested in this? I think I can create a plugin that just uncheck this checkbox for every status.
Offline
Re: 'Reset time to now' configuration
juanjonavarro wrote:
Are you still interested in this? I think I can create a plugin that just uncheck this checkbox for every status.
hi juan, yes I am!
Last edited by kees-b (2009-07-04 09:53:52)
Offline
Offline