Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-22 21:08:06

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#2 2009-05-26 08:25:00

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

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&section=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&section=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

#3 2009-05-26 10:02:19

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#4 2009-05-26 13:59:25

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2009-05-26 14:09:50

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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

#6 2009-05-27 06:00:48

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

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

#7 2009-05-27 17:59:54

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Future RSS/Atom Feeds

Oh thanks for that Robert. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB