Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-04-13 09:38:30

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

'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

#3 2009-06-02 17:23:36

LetterHoofd
Member
From: Kortrijk, BE
Registered: 2006-01-20
Posts: 40
Website

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

#5 2009-06-30 12:54:49

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

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

Re: 'Reset time to now' configuration

+1

Offline

#8 2009-07-01 06:50:14

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

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

#9 2009-07-01 07:25:39

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

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

#10 2009-07-03 15:24:27

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

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

#11 2009-07-04 09:53:19

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

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

#12 2009-07-04 10:34:16

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: 'Reset time to now' configuration

Here it is: jnm_no_reset_time

Offline

Board footer

Powered by FluxBB