Difference between revisions of "Extension talk:SimpleRSS.php"

From Organic Design wiki
(Special:Recentchanges example feed)
m (installed but no output?)
Line 16: Line 16:
  
 
==Testing==
 
==Testing==
 +
Installed ok (lists tag in Special:Version but not author details etc). Does not seem to give output even when arbitary output in hardwired into the return value. Maybe not quite installed properly? --[[User:Rob|Rob]] 18:25, 14 October 2007 (NZDT)
 
*[http://wikifs.org/Sandbox Here]
 
*[http://wikifs.org/Sandbox Here]
  

Revision as of 05:25, 14 October 2007

What it does

We want a more solid solution for the wiki RSS reading and rendering than the current MW:Extension:RSS Reader, including the following main concerns:

  • Single script install with no dependencies
  • Syntax and parameters compatible with MW:Extension:RSS Reader
  • Aggregation by specifying a list of urls
  • More control over what fields are displayed and their layout (with an extra template parameter?)
For example so that an RSS-based replacement for the recentchanges could be made
  • Optional Ajax so page load isn't held up and can update on change without page reloads
  • Control over file caching time and ajax update time

Purpose

We want to have a dynamically changing list of user-customisable aggregated RSS sources avalailble on pages and in the sidebar. These sources can include recentchanges feeds from our wikia so we can have the old changes-in-the-logo style effect, but using standard feeds from any sources and without consuming server resource from centralised polling.

Development

Rob has had experience with developing RSS related code before so he'll handle the main functionality and structure of the extension. Nad will handle the XML/DOM and Ajax aspects.

Testing

Installed ok (lists tag in Special:Version but not author details etc). Does not seem to give output even when arbitary output in hardwired into the return value. Maybe not quite installed properly? --Rob 18:25, 14 October 2007 (NZDT)

RSS parsing

The current extension uses an external dependency, lastRSS.php to read the RSS with simple file-based cache/expiry system using MD5(url) for filename. It may be doing some things we need to replicate ourselves, but most of the code is concerned with regular expressions for handling the XML, and that aspect can be handled much more compactly by reading the RSS as a DOM object instead.

Ajax

The ajax should be able to poll for headers only and then when changed it should post a request to MediaWiki which includes the changed feed and the timestamp of the last update. MediaWiki should then use an AjaxDispatcher to respond with the new item[s] which the ajax can then prepend to the innerHTML of the target area.

Special:Recentchanges example feed

<xml> <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="http://www.organicdesign.co.nz/wiki/skins/common/feed.css?97"?> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel> <title>OrganicDesign - Recent changes [en]</title> <link>http://www.organicdesign.co.nz/Special:Recentchanges</link> <description>Track the most recent changes to the wiki in this feed.</description> <language>en</language> <generator>MediaWiki 1.11.0</generator> <lastBuildDate>Sun, 14 Oct 2007 05:06:24 GMT</lastBuildDate>

<item> <title>Extension talk:Robs RSS extension.php</title> <link>http://www.organicdesign.co.nz/Extension_talk:Robs_RSS_extension.php</link> <description> </description> <pubDate>Sun, 14 Oct 2007 05:04:19 GMT</pubDate> <dc:creator>Rob</dc:creator> <comments>http://www.organicdesign.co.nz/Extension_talk:Robs_RSS_extension.php</comments> </item> </channel> </rss> </xml>

See also