Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
time ='future' articles disappear on day of event
Hello
I have a site where I’ve used the default article system as an event manager… I’m using the <code>posted</code> date as the date of the event, and calling future events like this:<code><txp:article form=“article_eventsTeaser” time=“future” sortdir=“asc” /></code>
My problem is that the events all happen in the evening, but they disappear from the ‘future’ events list on the day of the event not after the time of event has passed.
Does anyone know a fix for this?
I realise that the jmc_events plugin has a ‘present’ state that might solve this, but that plugin isn’t really relevent to this situation, because it also uses a lot of custom fields.
Offline
#2 2006-06-19 13:38:14
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: time ='future' articles disappear on day of event
You can set the date posted to one day after the event. To show the event date and for sorting you can use a custom field.
Offline
Re: time ='future' articles disappear on day of event
Thanks Els
It’s a fix, but I’d like to avoid that if I can…
I already have lots of custom fields and it would cause extra confusion for the user.
Offline
#4 2006-06-19 21:21:47
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: time ='future' articles disappear on day of event
I see, if there’s a user other than yourself it’s not a good solution, no. I’m not sure about this, but would the time attribute of chh_article_custom be able to do what you want?
Offline
#5 2006-06-19 21:25:46
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: time ='future' articles disappear on day of event
That’s expected behaviour – “future” doesn’t include “now”. :)
You could make two calls to article:
<txp:article form="article_eventsTeaser" time="future" sortdir="asc" />
<txp:article form="article_eventsTeaser" sortdir="asc" />
?
Offline
Re: time ='future' articles disappear on day of event
Hi Mary
I need the article to disappear after the time posted (or day of posting) has passed.
In my view the default behaviour is a bit unexpected in this case. Of course the articles system wasn’t designed with events in mind, but I’d expect the time of the posting to be a factor in defining past/future.
but I think acombination of your an Els’ suggestions might work here… I’m going to play around with something like this:
<code><txp:article form=“article_eventsTeaser” time=“future” sortdir=“asc” />
<txp:chh_article_custom form=“article_eventsTeaser” time=”-1 days,-0 day” /></code>
Offline
#7 2006-06-19 22:13:10
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: time ='future' articles disappear on day of event
If there just were another attribute: time=“future” included=“1” (or something like that)…
Offline
Re: time ='future' articles disappear on day of event
thanks both for your help…
the double call approach above seems to be working well :)
Offline