Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
RSS feed for files
I am going to be writing a site for someone non-techy, non-geeky. But I’d like to use TXP for it. His list of requirements are the usual sorts of thing:
- The current site is a pain to manage: check
- I wanna be able to post a blog: check
- I wanna publish a monthly report as a PDF: check
- I’d like to publish an RSS feed so people know when the PDF report is available: che… hmmmmmmm
So I can obviously get him to upload his report to the Files tab and stash it in a particular category. Thus I can link to the lastest 3 or 4 reports from the front page no problem. But how can I notify people via RSS that the file has been uploaded?
He won’t want to have to post a blog article to say “the report is ready” so can I offer a feed directly from uploaded files in a particular category? Or perhaps somehow have a page (hidden?) that has the list of PDFs on it via a file_download_list tag. Then, if that page changes in any way, it’s treated as “newly published” and tells people that the report is available?
I don’t mind if it has to be a custom PHP solution (hehe, I could make it a plugin eventually) but I just wanna find out how to go about it. Does anyone have any cunning ideas? It may be easy — not that I can find a thread about it here — but as I’ve never used feeds and stuff before, it’s all new territory for me. Please treat me as a total newbie in this area :-) Cheers!
Last edited by Bloke (2009-04-17 13:58:29)
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
Re: RSS feed for files
A total newbie here. Although I understand what RSS is meant to be, I’ve never fully grasped it.
Anyway, what about creating a section (“xml” or “files”) and a page for that section that is served as xml (there is a plugin for that)?
Then, add some TXP magic to generate a list of files wrapped by XML tags to create the RSS thing.
Voilà! You have your hand made RSS for PDF reports!
Offline
Re: RSS feed for files
It’s not exactly what your describing, but if you go the hidden article route, maybe wet_snitch might point you in the right direction?
Last edited by maverick (2009-04-17 15:15:21)
Offline
Re: RSS feed for files
Hey thanks maniqui, that’s crazy enough to just work! With mg_setheader and the tags in a trigger page I could probably fake a feed.
So all I need now is a reference manual for the format of an XML RSS feed. Shouldn’t be hard, must be one out there somewhere after a bit of googling.
And thanks for the pointer to wet_snitch, maverick. That’s also got legs. I might give that route a go if I get totally flummoxed with maniqui’s suggestion.
I’ll post the solution here if I get it going in case anyone else wants to have a go, but in the meantime if anyone has any more ideas or tips on how to actually do it (or a good resource on RSS feed formats), I’m all eyes. Thanks!
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
Re: RSS feed for files
Also this might be of help…
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: RSS feed for files
The customer RSS feed technique by Isaac Bowen depends on the article tag, so I’m not positive if this will be a solution. But I imagine it could be a step in the right direction.
- I’d like to publish an RSS feed so people know when the PDF report is available: che… hmmmmmmm
This actually got a laugh out of me.
Txp admin themes | dropshado.ws – a blog for design noobs like me
Offline
Re: RSS feed for files
Thanks colak / nemoorange for the link to Isaac’s solution. I looked at it and I think it might be able to be hacked into submission if I replace the <txp:article_custom>
with a <txp:file_download_list>
tag. The form could then be something like this:
<item>
<title><txp:file_download_name /></title>
<description>
<![CDATA[
<txp:file_download_description />
]]>
</description>
<link><txp:file_download_link /></link>
<pubDate><txp:file_download_created format="%a, %d %b %G %T %Z" /></pubDate>
<dc:creator>AUTHOR HERE</dc:creator>
<guid><txp:file_download_link /></guid>
</item>
The only sticking point might be the <dc:creator />
but it looks as if wet might have saved the day, providing one of the updates in the next few days is a <txp:file_download_author />
tag, or equivalent. I’ll see how it goes. It does mean running the site at the bleeding edge SVN but I can live with that.
Last edited by Bloke (2009-04-21 11:18:53)
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
Re: RSS feed for files
i read an article once on using wordpress as an email newsletter system. they called it wordburner by making a secret section of your site. anyways i guess you can use content management systems to do many things by making hidden pages as suggested here.
Last edited by mrtunes (2009-04-18 05:14:06)
Offline
Re: RSS feed for files
Hi Stef,
I’m not sure if you worked this out but this plugin by Jukka will be of help as it’ll save you a section.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: RSS feed for files
colak wrote:
plugin by Jukka will be of help as it’ll save you a section.
Yes indeed it will; I’ve been watching his thread with great interest. Just gotta see if I get the job for creating the site now :-)
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
Pages: 1