Difference between revisions of "Issue:RSS from DPL?"

From FollowTheScore
Jump to: navigation, search
(Reply: Cool but nonworking example)
Line 30: Line 30:
  
 
[[User:Gero|Gero]] 23:09, 26 February 2008 (CET)
 
[[User:Gero|Gero]] 23:09, 26 February 2008 (CET)
 +
 +
: If you touch and resave the article, the new entry ''does'' get picked up by RSS.  However, if you don't touch the article, RSS never notices if the DPL output changes.  For instance, the template below turns a category into an RSS feed, but it's useless because you have to touch & save the page to make it update.
 +
 +
<pre>
 +
<includeonly><startFeed title="Important changes"/></includeonly>
 +
{{#dpl:
 +
| category = {{{category}}}
 +
| ordermethod = lastedit
 +
| order = descending
 +
| addlasteditor = true
 +
| addeditdate = true
 +
| minoredits = exclude
 +
| format = \n,== %PAGE% ==\n\n,[[%PAGE%|%TITLE%]] modified %DATE% by [[User:%USER%|%USER%]]\n\n,
 +
| noresultsheader = No results for category {{{category}}}.
 +
}}
 +
<includeonly><endFeed/></includeonly>
 +
</pre>
 +
 +
--[[User:Maiden taiwan|Maiden taiwan]] 19:00, 9 July 2008 (CEST)

Revision as of 19:00, 9 July 2008

Description: Make each DPL into an RSS feed?
Extension / Version: DPL   /   Any
Type / Status: Change Request   /   open

Change request

It would be great if you could use a DPL to output an RSS or an Atom feed. Not sure exactly how the syntax would work, because you would not want to embed the actual XML in the page, but rather see the XML version of the DPL after clicking a certain link...

I have a prototype running from the MetaBase homepage, which you can see directly here; http://biodatabase.org/index.php?title=Template:New_Database_List/Feed

That prototype works by using the 'WikiArticleFeeds' (version 0.6.3) extension, which can be found here; http://jimbojw.com/wiki/index.php?title=WikiArticleFeeds

While that is all well and good, it would be nice if it was better!

Thanks for your consideration,

--Dmb 14:06, 26 February 2008 (CET)


Reply

Hello Dan, what you did looks quite nice to me. DPL can indeed be used to create contents for a publishing system like WikiArticleFeeds. The outer tag structure cares for feed creation, DPL decides what is in the feed. I wonder what happens if you touch the wiki page and re-save it. If there is one new item found by the query: will the publishing system be smart enough to recognize exactly this one as "new" and leave the rest in peace? Did you try things like that?

What precisely do you think can be improved?

Gero 23:09, 26 February 2008 (CET)

If you touch and resave the article, the new entry does get picked up by RSS. However, if you don't touch the article, RSS never notices if the DPL output changes. For instance, the template below turns a category into an RSS feed, but it's useless because you have to touch & save the page to make it update.
<includeonly><startFeed title="Important changes"/></includeonly>
{{#dpl:
| category = {{{category}}}
| ordermethod = lastedit
| order = descending
| addlasteditor = true
| addeditdate = true
| minoredits = exclude
| format = \n,== %PAGE% ==\n\n,[[%PAGE%|%TITLE%]] modified %DATE% by [[User:%USER%|%USER%]]\n\n,
| noresultsheader = No results for category {{{category}}}.
}}
<includeonly><endFeed/></includeonly>

--Maiden taiwan 19:00, 9 July 2008 (CEST)