Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Future RSS/Atom Feeds
Well having asked a question in the “How to” forum without answer I figured I should move here.
It would seem that the current TXP feed tags won’t allow the display of “future date” articles. I think this feature would be extremely useful for sites that have event listings of one type or another. Oddly, I would find it useful right now. ;)
Perhaps the addition of a new “time” attribute or something similar that could default to “past” to display the usual “current and past” articles plus b/c but could also be set to “future” to display future-dated articles.
Is this doable and if so, could we expect it and if so, would that be soon-ish or not?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Future RSS/Atom Feeds
thebombsite wrote:
Is this doable and if so, could we expect it and if so, would that be soon-ish or not?
It is doable, but it has some severe privacy and information exposure implications if it is done the wrong way.
In depth:
You would introduce something like <txp:feed_link flavor="rss" format="link" label="RSS" time="future" section ="events" />
into your page templates, which would result in markup like so:
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://example.com/rss/?time=future§ion=events" />
See? Without any measures to obfuscate the feed URIs, basically anyone with a little HTML knowledge could gain a peek on any future article at your site by just browsing to e.g. http://example.com/rss/?time=future§ion=secret
To prevent this information leakage, we would have to introduce a non-reversible way to encrypt the desired feed output options, making this a costly feature request with an estimated small target audience, so to speak.
Offline
Re: Future RSS/Atom Feeds
Ahh. Thanks for that Robert. I see the potential problem. No worries. I’ll have to look at some other method.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Future RSS/Atom Feeds
Stuart,
you could try with smd_calendar. Although smd_calendar natively uses the posted and expiry dates for start and end dates, it also let you define a custom field for those dates.
So you could publish events with a “present” (past) date, so they will appear in feeds, but have them displayed in your site (and in your feeds) including the real date for the event. For including custom fields in your feeds, you will probably need another plugin (I think thre is one by Juanjo Navarro).
Offline
Re: Future RSS/Atom Feeds
Thanks Julián. I am currently looking at an external script so maybe create my own feed just for that section. The site is using Stef’s plug-in and you can output a future listing but not for a feed. I’ll have a look at your suggestion if my current experiment fails.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Future RSS/Atom Feeds
thebombsite wrote:
…maybe create my own feed just for that section.
wet_snitch might serve as a starting point. You’d probably only have to change the SQL qualifiying clause, and you’re set.
Offline
Re: Future RSS/Atom Feeds
Oh thanks for that Robert. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline