Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Make future articles appear in RSS feeds?
Is there a way that I can get future articles (using time=“future” ) to show up in RSS Feeds? It seems a shame to install an extra plugin to do this, when I’ve managed to get everything else working using default TXP and custom fields. Any ideas?
Cheers,
Jon VC#9
Offline
Re: Make future articles appear in RSS feeds?
May I invite you back to square one, please? Why would you want to predict the future within feeds?
Offline
Re: Make future articles appear in RSS feeds?
I’m using time=“future” As an event manager.
Cheers,
Jon VC#9
Offline
#4 2006-11-29 18:50:05
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Make future articles appear in RSS feeds?
You would have to create a plugin, if one does not already exist.
Offline
Re: Make future articles appear in RSS feeds?
So you’d be a possible beneficiary of my patch establishing expiry dates for articles? I am not ware of any plugin solution which works for feeds, they all only modify the browser presentation.
Offline
#6 2006-11-29 22:36:15
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Make future articles appear in RSS feeds?
wet, I had a quick glance at your patch and from my POV (user, website admin) it looks great – have 3 or 4 sites with a focus on events
would like ‘events’ to turn up in RSS feeds too – after posting a next month’s worth of gigs, be great if media organisations and venue websites could pull this down and use it
PS the other hassle is getting ‘future’ articles to appear in search results! haven’t tested whether this is different in 4.0.4
Last edited by nardo (2006-11-29 22:40:51)
Offline
Re: Make future articles appear in RSS feeds?
time="future"
is a workaround full of shortcomings, imho. Articles with future posting dates will appear nowhere but the listings produced by txp:article time="future"
, and this is a good thing.
But on the other hand, this is the reason why I did this patch, as it will work the way the txp publishing mechanism was intended and allow schedules of all kinds, while preserving the normal flow of publishing logic.
Offline
Re: Make future articles appear in RSS feeds?
Yeah, I can see that it goes against the system to show future articles in RSS. I did try hand rolling a RSS feed using @<txp:article_custom time=“any” /> but no cigar. It looks like the leasy complicated way to achieve this is using a custom field for the date, rather than the timestamp.
Thanks for the input!
Cheers,
Jon VC#9
Offline
Re: Make future articles appear in RSS feeds?
Not strictly covering your aversion against plugins, but how’s about ras_delete_expired?
Last edited by wet (2006-11-30 08:52:10)
Offline
Re: Make future articles appear in RSS feeds?
Sorry, I’m not sure how that plugin would help? Do you mean using the expiration date as the event date?
The only reason I mentioned plugins was that there is the jmc_event_manager plugin, which I think allows an RSS feed of dates. Its just that I was so close to doing it all without a plugin! ;)
Cheers,
Jon VC#9
Offline
Re: Make future articles appear in RSS feeds?
Hmm… I have a habit of making event related articles disappear from the site as soon as the event has passed, so I thought that this was your intent, too.
With that in mind, I’d:
- publish event related articles whenever it seems appropriate before the event and thus find it in the feeds
- set the expiration date to the events date (this would also be displayed of the web page)
- and let the plugin delete the article as soon as the date passes.
But maybe you have a very different workflow in mind and I’m just ranting based on my own habits.
Offline
Re: Make future articles appear in RSS feeds?
I was also looking for a way to get articles with future (and past) posted dates to appear in the feed.
You can make this happen by editing the rss.php file in the /textpattern/publish/ directory. Just change line 52-57 to:
$rs = safe_rows_start(
"*, unix_timestamp(Posted) as uPosted, ID as thisid",
"textpattern",
"Status = 4 ".join(' ',$query).
"order by Posted desc limit $limit"
);
If you want sticky items to appear in the feed, adjust Status = 4 accordingly. I would roll this into a plugin, but I am not sure how this type of admin plugin works within TXP (especially one that would work with rss() and not completely replace it).
Hope this helps.
Last edited by Jeff_K (2006-12-12 21:35:32)
Offline