Extension talk:RSS/Archive 1

Warning Warning: This is page has archived content and is closed. If you want to contribute, please add your comments on the current discussion page.


how to use the Extension

edit

Hi, I'm new in using the extensions and I don't Know where to put the code "Extension:RSS -- Error: "http://rss.slashdot.org/Slashdot/slashdot%7Ccharset=UTF-8%7Cshort%7Cdate%7Cmax=5" is not in the list of allowed feeds. The allowed feeds are as follows: https://wikimediafoundation.org/news/feed/, https://wikimediafoundation.org/category/technology/feed/, https://wikimediafoundation.org/category/technology/mediawiki/feed/, https://discourse-mediawiki.wmflabs.org/c/ask-here.rss, https://codeclimate.com/github/wikimedia/mediawiki-extensions-CentralNotice/feed.atom, https://codeclimate.com/github/wikimedia/mediawiki-extensions-DonationInterface/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-crm/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-dash/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-php-queue/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-SmashPig/feed.atom and https://codeclimate.com/github/wikimedia/wikimedia-fundraising-tools/feed.atom. ". I've installed the extension but do't know how to use. really I did't understand the example, also i got "This is not a valid entry point." when i call rss.php from my browser window>

any one help please, Thanx. --Gerges 11:52, 31 August 2009 (UTC)Reply

Create a blog with agregated content

edit

Hi, on Design Platform we would like to make a page that agregate the updates from different blogs. Currently we use this extension and display the titles for each blog. Well... The section is becomming huge. What we would like to do is like a blog with would display the news (first part of the text) from each blog article in order. Do you think it is possible someaway ? Thanks ! --Thibho 23:37, 10 July 2009 (UTC)Reply

Cannot modify header information

edit

I installed the RSS Extension and if I want to use it, I get the error:

Warning: Cannot modify header information - headers already sent by (output started at/kunden
/140041_45136/cr-eu/start/ticopedia/extensions/rss.php:1) in /kunden/140041_45136/cr-eu/start
/ticopedia/includes/WebResponse.php on line 10

I use Mediawiki-Version 1.13 (www.ticopedia.de)

What should I do ? What I have to change in teh rss.php or in the webResponse.php ?? --88.78.37.161 17:27, 30 November 2008 (UTC)Reply

Incompatibility with MW 1.12

edit

Hi all, I have an incompatibility using this plugin, it produces a SQL DB error... It says that the table mw_cur doesn't exist. OK, it was the fix that I did not applied correctly...--Rmatt 14:45, 28 March 2008 (UTC)Reply

Internationalisation problems

edit

When I try to read a feed on french, UTF-8 encoded, I have a problem. If I add the parameter charset=UTF-8 the text is cutten after the first exotic character (é, à...) and the rest of the text do not appear.

If I remove this parameter theses characters all well processed, but the apostrophs (') are replaced by (?). Any ideas ? I did not install any additional iconv library.

Misformatted text

edit

I'm not sure if it's rss.php or the Magpie parser at fault, but RSS feeds with embedded <pre>…</pre> tags are not displayed properly. All the newlines are stripped out and replaced with spaces, which ruins the formatting. —Psychonaut 14:23, 7 April 2008 (UTC)Reply

Notitle

edit

Hi, great work, however I miss "notitle" option when showing RSS feed. I have pages where I define RSS feed and pages where I show various feeds. Always showing source of RSS feed (name of the site + mediawiki page) is really annoying. It would be great if "notitle" option is inclueded into next ver.

--89.212.65.33 09:35, 14 April 2008 (UTC)Reply

Formatting of feeds

edit

This is a great extension but for some reason I can't seem to get my wordpress feed to work. I'm using a wordpress category feed http://ehealth.oerc.ox.ac.uk/?feed=rss2&cat=3. is this formatting no good for your extension. I'm getting the failure message.

Text Editors

edit

I tried using nano to create the rss.php and the extension just won't work! Using Vi did the trick. --202.52.76.99 02:33, 5 June 2008 (UTC)Reply

XML

edit

how can i add a feed like this: http://www.asdfasdfasd.com/news/feed.xml? Bennylin 04:00, 7 June 2008 (UTC)Reply

Chinese language Feed Problem

edit

When I used it to read a Chinese Simplified Language Feed (the charset is UTF-8) It doesn't work . What I saw are NOT normal words

Update: This Problem is resoloved . Just add a line to rss.php :

define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');

Proposed Patch (error handling)

edit

sometimes, feeds aren't as clean as they should be. the rss extension was throwing php errors at me, so I added some checks to make sure we have the feed (and date in it) correctly from magpie:

this, after the feed fetch on line 108

edit
   #if magpie feed collection fails and $rss is not set, return error.
   if (!isset($rss) || $rss == '' || is_null($rss) ){
   return "<div>Failed to load RSS feed from $url!</div>";
       }

this, after the line 138, to make sure the pubdate actually exists in the feed

edit
           # patch for error when pubdate not present in feed  
   	  if (isset($item['pubdate'])) {
              # throws PHP errors if pubdate not present in RSS feed
  	        $pubdate = trim(iconv($charset,$wgOutputEncoding,$item['pubdate']));
  	        $pubdate = date("d.M. H:i",strtotime($pubdate));
  	  }
  	  else {
           # No point trying to add pubdate to the cite, because there isn't one!
  	     $date = false;
        }

Help?

edit
  • I have been having trouble getting this patch to work. It was clear where to put the bit after feed fetch, but this 'after line 138' isn't as obvious. Is that line 138 before or after adding the code at line 108? Could someone specify the code above and below where you insert this patch? - Helen

I can't get the parameters to work.

edit

On my wiki site the RSS works, but I cannot get the "max=5" entries to work. I get the error message: "Error: It's not possible to get max=5." The code I'm using is: Extension:RSS -- Error: "http://www.webaddress.com%7Cmax=5" is not in the list of allowed feeds. The allowed feeds are as follows: https://wikimediafoundation.org/news/feed/, https://wikimediafoundation.org/category/technology/feed/, https://wikimediafoundation.org/category/technology/mediawiki/feed/, https://discourse-mediawiki.wmflabs.org/c/ask-here.rss, https://codeclimate.com/github/wikimedia/mediawiki-extensions-CentralNotice/feed.atom, https://codeclimate.com/github/wikimedia/mediawiki-extensions-DonationInterface/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-crm/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-dash/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-php-queue/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-SmashPig/feed.atom and https://codeclimate.com/github/wikimedia/wikimedia-fundraising-tools/feed.atom.. Please offer suggestions if you have any. Thanks! 169.253.4.21 18:22, 25 September 2008 (UTC)Reply

Using magpie behind a proxy

edit

I have mediawiki 1.4 set up on our intranet behind a proxy server. No matter what I try, I can't get magpie to pull any feeds through our proxy. I've changed the Snoopy.class.inc file to what I *believe* are the appropriate settings, but still I get an error like "Failed to load RSS feed from http://www.mediawiki.org/w/index.php?title=Special:RecentChanges&feed=rss!" A working sample of Snoopy.proxy.inc and/or any other tips to get this working would be very helpful. Thanks!! 20:09, 2 January 2009 (UTC)

Probably you are behind a Microsoft ISA proxy that needs NTLM authentication. If this is your case, just install NTLMAPS (you'll need Python), then change the Snoopy.class.inc file (proxy_host and proxy_port variables) to point to your new local NTLMAPS proxy and finally configure your NTLMAPS (the file runserver.bat must have the correct path to python.exe and the following parameters must be configured in the file server.cfg: NT_DOMAIN, USER, PASSWORD, PARENT_PROXY, PARENT_PROXY_PORT). I've tested here and it worked perfectly. My current configuration is: Mediawiki 1.15.1, PHP 5.2.9, Apache 2.2.11, NTLMAPS 0.9.9, Python 2.6.4. --Felix Almeida 200.169.115.32 21:36, 13 November 2009 (UTC)Reply

Internationalisation problems still yet and with MW 1.14

edit

Hi people,

I have a problem with my french feeds. They are trimmed after every character like é, è, à or even "'".

Furthermore, it is showing a problem as text on the top of the page, which is very odd, showing :

{{Notice: iconv() [function.iconv]: Detected an illegal character in input string in /home/ffe-ps/www/wiki/extensions/rss.php on line 181}}

You can check at : FFE-PS Localité:Berlin

Thanks for your support and the great work already done ! --Rmatt 15:39, 1 March 2009 (UTC)Reply

HTML stripped out

edit

I've tried this extension (and several of its predecessors) on a Fedora 9-based MediaWiki 1.13.3 installation. Displaying the short version of a feed is fine, but the long version is consistently stripped of html formatting -- specifically, less-than and greater-than characters are completely stripped out, so the resultant page has things such as "Line one br /Line two" (where the br / should be a break tag).

I'm obviously missing something. Any ideas what? --Chris Tyler 16:26, 2 March 2009 (UTC)Reply

Perhaps, this libxml2 bug? http://bugs.php.net/bug.php?id=45996 --Ashawley 04:45, 22 April 2009 (UTC)Reply

list of Mediawikis having the rss extension installed

edit

MattisManzel 19:58, 10 April 2009 (UTC):Reply
I'm looking for a list of Mediawikis with the rss extension installed or a clever query that finds many of them. Somebody knows?

MattisManzel 11:21, 17 April 2009 (UTC):Reply
I started one on odd-wiki-hive - 'wiki-net' - Mediawikis with rss extension.

I tried the extension here: http://www.healthplusplus.com/wiki/MedlinePlus_Health_News

Any way to keep feeds from being cut/trimmed?

edit

Is there any way I can keep text from the feeds from being cut off after a certain number of characters? -Swooshy

Unescape HTML special characters

edit

The HTML entities need to be unescaped. I had better luck with the following patch:

   --- rss.php~    2009-04-21 19:57:57.000000000 -0400
   +++ rss.php     2009-04-22 02:02:54.000000000 -0400
   @@ -151,6 +151,7 @@
                #Build description text if desired
                if ( $item['description'] ) {
                    $text = trim( iconv( $charset, $wgOutputEncoding, $item['description'] ) );
   +                $text = html_entity_decode($text);
                    #Avoid pre-tags
                    $text = str_replace( "\r", ' ', $text );
                    $text = str_replace( "\n", ' ', $text );

Or has something changed? --65.183.152.86 06:18, 22 April 2009 (UTC)Reply

Cache

edit

It's maybe a good idea to add a cache dir. In file rss.php I put after line

require_once('extensions/magpierss/rss_fetch.inc');

these two:

define('MAGPIE_CACHE_DIR', './rsscache');
define('MAGPIE_CACHE_AGE', 30*60); // 30 minutes

The change permission for the rsscache directory, same as the images directory. By default, on my wiki, it wrote to the ./cache dir which is use by the mediawiki for its filecache.

- 129.194.8.73 18:14, 17 June 2009 (UTC)Reply

License Discussion

edit

If you are one of the authors who edited this extension, please join the discussion about licensing to include it in a Fedora package User_talk:Mutante#RSS_Extension_Licensing. Mutante 23:30, 8 July 2009 (UTC)Reply

Bug: Server logs PHP warnings if upstream rss feed doesn't contain 'date', 'description'

edit

<rss>http://blog.illogicopedia.org/feeds/posts/default|short|max=8</rss> is included from a template on the http://illogicopedia.org main page.

As the extension finds no date stamps and no one-paragraph description texts for the individual items in this feed (which appears to be Blogspot-generated), the server log is a mess of PHP warnings:

PHP Notice: Undefined index: description in extensions/rss/rss.php on line 127
PHP Notice: Undefined index: pubdate in extensions/rss/rss.php on line 187
PHP Notice: Undefined index: dc in extensions/rss/rss.php on line 189

The date stamps for each item, if not present, are displayed to the user as "January 1, 1970" if the 'date' option happens to be enabled in wikitext. This is based on the current version (v1.5 of this RSS extension) running under MediaWiki 1.16alpha. --Carlb 21:28, 30 August 2009 (UTC)Reply

Had the same Problem

edit

Confirmed.

Happened to me on:

  • MediaWiki 1.13.3
  • PHP 5.2.10-pl1-gentoo (cgi-fcgi)
  • MySQL 5.0.76-log

I used this solution:

Before that i used an even simpler solution, i commented out all lines with pubdate in it as i am no php-coder.

85.179.25.48 12:14, 19 September 2009 (UTC)Reply

Same here on my MW 1.16a for both; the error message and the wrong date format ("January 1, 1970") for some feeds (which read a correct date in e.g. netvibes). Any solutions except disabling them? --Subfader 22:35, 9 December 2009 (UTC)Reply
Using checking if isset now: e.g.
			if ( isset($item['pubdate']) ) {
				$pubdate = trim( iconv( $charset, $wgOutputEncoding, $item['pubdate'] ) );
			if ( $pubdate == '' ) {
				$pubdate = trim( iconv( $charset, $wgOutputEncoding, $item['dc']['date'] ) );
			 } else {
		    $pubdate = date( "Y-m-d", strtotime( $pubdate ) );
		   }} else {
		    $pubdate = '0000-00-00';
		   }
		   
if ( isset($item['description']) ) {
	  $desc = $item['description'];
	 } else {$desc = '';}

--Subfader 21:27, 10 December 2009 (UTC)Reply

HTTPS / SSL

edit

I had to modify the magpierss-0.72 included PHP file Snoopy.class.inc $curl_path variable to point to the correct location of the curl binary executable on my server in order to get the extension to feed from a WordPress blog with an HTTPS URL. Works great now. Thanks! —128.183.226.220 13:18, 4 December 2009 (UTC)Reply

Usage in templates?

edit

I can't seem to be able to use the rss tags in templates?:
{{Template|http:///www.some.com/feed}}
Template: <rss>{{{1}}}|max=2</rss>
Result: Failed to load RSS feed from {{{1}}}! --Subfader 02:35, 10 December 2009 (UTC)Reply

Try {{#tag:rss|{{{1}}}|max=2}} instead. Also, try calling the template with the 1= parameter {{Template|1=http://www.some.com/feed}} -- this is necessary if a URL contains special characters incompatible with a template call. LobStoR 13:25, 10 December 2009 (UTC)Reply
Thanks, totally forgot about it. This should be implented for modern MW versions. --Subfader 22:09, 10 December 2009 (UTC)Reply

Fetching the enclosure tag

edit

Fetching the enclosure tag was never implented to the outdated MagicpieRSS (last version is from 2005). So there was a fix for rss_parse.inc here. But this extension only makes use of rss_fetch.inc so that might explain why I failed? Did anybody manage to add the hotfix to this extension? --Subfader 03:49, 12 December 2009 (UTC)Reply

How to modify the length of the description? [SOLVED]

edit
filed as bug 30377 Suggestion: add a new parameter to limit the number of characters when rendering the channel item <description>
solved in https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111350 .

hi, I'd like to have only 50 characters. How can I change it?

thanks

andy

Something like this:
preg_replace('/^(.{150}).{3,}(.{25})$/us', '$1 ... $2', $item['description']);
Play around with the numbers and you'll see. --Subfader 21:48, 5 March 2010 (UTC)Reply
Where can I insert this in rss.php? 80.218.143.73
I changed rss.php a lot so I didn't check it, but it should work like this: Replace
if ( $item['description'] ) {
$text = trim( iconv( $charset, $wgOutputEncoding, $item['description'] ) );

with

if ( $item['description'] ) {
$shortdesc = preg_replace('/^(.{150}).{3,}(.{25})$/us', '$1 ... $2', $item['description']);
$text = trim( iconv( $charset, $wgOutputEncoding, $shortdesc ) );
This will shorten the description text to [150 chars ... 25 chars]. --Subfader 19:15, 16 March 2010 (UTC)Reply

Some feeds work, and some don't!

edit

I have developed a private wiki based on MediaWiki 1.15.1, PHP 5.2.6 and MySQL 5.0.89. I have four RSS feeds on my Main Page, two work and two do not.

The two that work use the code:

- <rss>http://www.flightglobal.com/feed/3d4b1ec9-34e2-485b-a2f0-bf636bb694b1/flight-ccp/airlines.xml|charset=UTF-8|short|max=10</rss>

- <rss>http://www.airbus.com/en/utilities/rss.jsp|charset=UTF-8|short|max=10/</rss>

The two that don't work use the code:

- <rss>http://www.caa.co.uk/RSS/RSS_18.xml|charset=UTF-8|short|max=10</rss>

- <rss>http://boeing.mediaroom.com/index.php?s=43&pagetemplate=rss&category=683510|charset=UTF-8|short|max=10</rss>

The two that don't work, correctly retrieve the feed items, but when a feed item is chosen, it issues a URL in which all the parameters are without a proceeding '&', and are therefore returning a 'file not found'.

What to do? Cheers, Richard McDonald Woods 17:43, 26 February 2010 (UTC)Reply

Heavy server load

edit

I have a page on my wiki where I list 40 RSS feeds with 2 items per feed. I don't use cache since I need to be sure I receive them as fresh as possible when I open the page. Loading this page takes ~30 seconds and the srever CPU raises from ~3% to 12%. Anybody got an idea how to reduce the load? I use this extension together with magpierss 0.51. --Subfader 13:55, 28 February 2010 (UTC)Reply

Trouble aggregating from google's calendar

edit

I have trouble with displaying date from google calendar - the plugin displays 01.01.1970, instead of date, shown in XML. How to fix it? where to look? :)

Dates from RSS Feeds are not correct (they are either in UTC or GMT time)

edit

If you're using magpierss with a WIKI, and the date and time aren't coming through as expected (e.g. in UTC or GMT instead of your local date/time e.g. NZDT), the suggested LocalSettings.php settings may be conflicting with your Local Time Zone.

Suggestion from Manual:Timezone is below:

$wgLocaltimezone = "Pacific/Auckland";
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
# Versions before 1.7.0 used $wgLocalTZoffset as hours.
# After 1.7.0 offset as minutes
$wgLocalTZoffset = date("Z") / 60;
putenv("TZ=$oldtz");

However, to get this extension to correctly display the date/time the RSS feeds were created, remove all of the above and just use:

$wgLocaltimezone = "Pacific/Auckland";
$wgLocalTZoffset = date("Z") / 60;

It fixes the incorrect displaying of RSS feed dates and times. All history pages are correctly stamped also (e.g. upload, deletion, recent pages logs)

filter option is not working on MW 1.14

edit

I am using mediawiki 1.14. I have installed Rss extension and found that The filter and filterout option is not working. I tried below code and it just returned top 2 stories from the blog, same result for filterout option: Extension:RSS -- Error: "http://blog.symbian.org/feed%7Cfilter=composing%7Cmax=2" is not in the list of allowed feeds. The allowed feeds are as follows: https://wikimediafoundation.org/news/feed/, https://wikimediafoundation.org/category/technology/feed/, https://wikimediafoundation.org/category/technology/mediawiki/feed/, https://discourse-mediawiki.wmflabs.org/c/ask-here.rss, https://codeclimate.com/github/wikimedia/mediawiki-extensions-CentralNotice/feed.atom, https://codeclimate.com/github/wikimedia/mediawiki-extensions-DonationInterface/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-crm/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-dash/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-php-queue/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-SmashPig/feed.atom and https://codeclimate.com/github/wikimedia/wikimedia-fundraising-tools/feed.atom. Any idea how to fix this problem? Thanks

edit

Is there a way to change the string that links back to the original item after the description? Currently it looks like [?], but I'd like to change it to some text. Thanks! Alexkozak 18:39, 3 August 2010 (UTC)Reply

nothing is cached

edit

I installed the extension, and created the cache folder, set it be writable by wm, and created a page with rss, the rss was show, but nothing under the cache folder.

NoFollow tag

edit

Is it possible to add the NoFollow tag to external links?

[SOLVED] Problems with HttpRequest in RSSFetch.php

edit
fixed - I finally read the manual and noticed that this extension needs MW 1.16+ to run. MW Versions before this will not work due to different implementations of the includes/HttpFunctions.php code. Mr3641 07:46, 27 October 2010 (UTC)Reply
Another problem with HttpFunction failures was solved in Bug 111588. Please always use the latest version of the extension (if you can). --Wikinaut (talk) 12:59, 23 February 2012 (UTC)Reply
fixed - on the current development version (1.20alpha) with current RSS (1.90), I found that the code fell over when an RSS feed is tagged, with error
'HttpException' with message 'HttpRequest::factory() expects parameter 2 to be long, array given'
. To get around this, I renamed HttpRequest to MWHttpRequest in RSSParser.php (line 220), as suggested in the /includes/Httpfunctions.php file. This fixed it for me. --130.56.26.208 12:04, 9 July 2012 (UTC)Reply

I can't get the extension to work due to errors in the _fetch_remote_file method of RSSFetch.php. In particular, I get a:

exception 'HttpException' with message 'HttpRequest::factory() expects parameter 2 to be long, array given' in /usr/share/mediawiki-1.15.3/extensions/RSS/RSSFetch.php:199

which indicates that the method call isn't correct. A few lines down in this method, I also see calls to $client->setUserAgent and $client->execute, which are methods that don't show up in the HttpRequest manual (http://usphp.com/manual/en/class.httprequest.php). Is there another library for HttpRequest that I should be using? I'm working with mediawiki 1.15 on ubuntu 10.4, using php 5.3.2 and PECL_HTTP. Mr3641 07:48, 25 October 2010 (UTC)Reply

[SOLVED] hacked in a fix for date formatting (from google feeds)

edit
Version 1.92 introduced an optional date="<formatstring" attribute, see Manual page. --Wikinaut (talk) 08:14, 16 February 2012 (UTC)Reply

I see above there are a few people that noted date parsing problems, likely with older releases. I just spent some time hacking through and fixing it to work as much as I needed. Based on what I can see in the svn history, the release I was using was somewhere around r69779, but doesn't seem to exist as I have it downloaded in the repository.

http://gist.github.com/648441

The other caveat I have is that this issue arose from relying on PHP's strtotime to parse RSS pubDate elements. However, an RSS 2.0 pubDate is an RFC 822 date, and it doesn't seem that strtotime can handle 'UT' for the 'GMT' alias per RFC822, Section 5.1. This seems like a special case that probably needs to be handled.

Another special case is the use of 'updated' for atom feeds, which doesn't seem to exist in the current svn, but was somehow handled outside the calling of 'normalize' in the older version I modified. Which caused problems of its own. However, I don't see any Atom handling in the current version.

Thanks for providing this extension! --opellotalk 05:31, 27 October 2010 (UTC)Reply

Fatal Error:

edit

I'm not sure what I did wrong, but I am getting this error: Fatal error: Call to undefined method CurlHttpRequest::getStatus() in /wiki/extensions/RSS/RSSParser.php on line 296.. I installed it properly, not sure what gone wrong. Thanks!

Any help?Achilles2010 12:37, 12 November 2010 (UTC)Reply

Any updates? Another person's experiencing the same problem... Achilles2010 16:43, 14 November 2010 (UTC)Reply

Second Fatal Error Report

edit

Fresh Install MediaWiki 1.16.0; Fatal error: Call to undefined method CurlHttpRequest::getStatus() in /w/extensions/RSS/RSSParser.php on line 295

This needs to be fixed ASAP! And where are the prior functional versions?!!? I can only find the current broken version....

173.54.196.218 23:55, 13 November 2010 (UTC)Reply

Version 1.8 requires MW 1.17+ according to the infobox. --Subfader 19:26, 14 November 2010 (UTC)Reply
I noticed that, where can I get a copy of the old (functional) version compatable with 1.16, I can't find anything but the latest build. Civilwartalk 03:46, 15 November 2010 (UTC)Reply

A workaround: You can get an older version from here: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/RSS/

Use a CLI subversion client:

#apt-get install subversion

Get an older version of RSS:

#svn co -r r71177 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/RSS

Move it to the extension directory:

#mv RSS /usr/share/mediawiki/extensions/

#vi /etc/mediawiki/LocalSettings.php

Place the following text in your LocalSettings.php file: require_once("$IP/extensions/RSS/RSS.php");

(Make sure there's a semicolon (;) at the end of that line)

This revision 71177 works with MediaWiki 1.15.1. A better option could be to upgrade MediaWiki itself ... Muuh 12:13, 16 November 2010 (UTC)Reply

In the end I ended up reverting back to a prior version of RSS: http://www.mediawiki.org/w/index.php?title=Extension:RSS&oldid=328741 I just can't seem to get the latest version working error free in 1.16.0, I have no idea where one gets 1.17.0, that's beyond my capability at this time, 1.16.0 is the latest stable version, I do not use beta products. I would like to know why RSS went from a stable extension to a beta extension... This method of improving an extension with no easy access to prior versions hard to work with. 24.136.109.218 18:33, 16 November 2010 (UTC)Reply
Agree. That one worked, thanks 24.136.109.218. :) Achilles2010 17:07, 17 November 2010 (UTC)Reply

Stray characters breaking your DOM parser? I've got code for you.

edit

If anyone's having trouble with stray characters getting into their feeds and breaking the DOM parser, it might be worth it to check out this code I wrote: http://pastebin.com/wTie504i

// In extensions/RSS/RSSParser.php in around line 330:
// Strip invisible control characters from the raw XML string.
$safe_xml = preg_replace("/\p{C}/", "", $raw_xml);
wfSuppressWarnings();
$this->xml->loadXML( utf8_encode ( $safe_xml ) ); // Be sure to re-encode as UTF-8.
wfRestoreWarnings();

I don't have SVN access, nor do I really care to commit to that, but maybe someone should give the code a once-over and add it to the repo.

CryptoQuick 01:21, 6 June 2011 (UTC)Reply

misplaced templates?

edit

Info: MediaWiki 1.17.0, PHP 5.2.17 (cgi-fcgi), MySQL 5.1.56-community-log. installed RSS from extensions downloader (RSS-MW1.17-r77687.tar.gz) and untarred on my server. Using standard wiki language: <rss>http://feeds.nytimes.com/nyt/rss/HomePage</rss>. Page doesn't throw any errors, but it is just blank. My MW install is relatively new--I am just missing some templates somewhere?

Failed to load RSS feed

edit

Does it work at all? Failed to load RSS feed:

<rss max=5>http://rss.slashdot.org/Slashdot/slashdot</rss>

Extension:RSS -- Error: "http://rss.slashdot.org/Slashdot/slashdot" is not in the list of allowed feeds. The allowed feeds are as follows: https://wikimediafoundation.org/news/feed/, https://wikimediafoundation.org/category/technology/feed/, https://wikimediafoundation.org/category/technology/mediawiki/feed/, https://discourse-mediawiki.wmflabs.org/c/ask-here.rss, https://codeclimate.com/github/wikimedia/mediawiki-extensions-CentralNotice/feed.atom, https://codeclimate.com/github/wikimedia/mediawiki-extensions-DonationInterface/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-crm/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-dash/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-php-queue/feed.atom, https://codeclimate.com/github/wikimedia/wikimedia-fundraising-SmashPig/feed.atom and https://codeclimate.com/github/wikimedia/wikimedia-fundraising-tools/feed.atom. --Subfader 14:25, 23 July 2011 (UTC)Reply

Per bugzilla:30028, yes it does. Reedy 14:33, 23 July 2011 (UTC)Reply
Same issue happening here.
<rss max=3>http://news.google.com/news?pz=1&jfkl=true&cf=all&ned=us&hl=en&output=rss</rss> or any RSS link gives a blank page. When no link is given, it at least shows 'Not a valid URL:' -- MechanicalApe 18:41, 30 July 2011 (UTC)Reply
Why was the status changed to stable? it's not stable...
A time-out failure is not a failure of the extension.
Well, the problem is now known, the extension RSS does work stable for RSS feeds - but not for ATOM feeds. Let's keep it the status on "experimental", I agree. The next fix will be committed today, which increases legibility of the source, and changes a behaviour. A further fix for the loading and parsing problem will be committed most likely next week, as I'm working on it. --Wikinaut (talk) 12:53, 23 February 2012 (UTC)Reply

How to format the date? [SOLVED]

edit

Is there any way to format the ouput of the date? --Pintman 12:07, 31 August 2011 (UTC)Reply

That can be done in the template with the #time parser --DaSch 14:21, 31 August 2011 (UTC)Reply
Version 1.92 introduced an optional date="<formatstring" attribute, see Manual page. --Wikinaut (talk) 08:12, 16 February 2012 (UTC)Reply

reading RSS from a secure server

edit

Hi there, I am having problems reading the contents of a rss feed which can only be accessed through https, otherwise the plugin works fine for other feeds without that characteristics. Any ideas on how this can be solved? Thanks very much in advance.

check (if you have server root access), whether a wget or curl to the rss feed url works. If the certificate is untrusted, for example, because it is self-signed, this access will throw an error on your server. Maybe the same problem as described in other context here. --Wikinaut 19:38, 11 October 2011 (UTC)Reply

RSS 1.90 (20110815) and MW 1.18, does not work

edit

Testing a vanilla MW 1.18 installation with the extension RSS feed (Version 1.90 20110815) just doesn't work as as expected with a <rss max=5>http://news.google.com/news?hl=ja&ned=us&ie=UTF-8&oe=UTF-8&output=rss&topic=ir</rss> feed, it generates html code within the feed ... <table border="0" cellpadding="2" cellspacing="7" style="vertical-align:top;"><tr> ... but the same RSS feed used on a MW 1.17 with RSS feed (Version 1.6) just works fine. --MWJames 07:25, 30 November 2011 (UTC)Reply

Thanks for the info. --Wikinaut 07:40, 30 November 2011 (UTC)Reply

[SOLVED] No line breaks between feed items

edit

There are no line breaks -- no breaks of any kind, in fact -- at the beginning or end of the rendered output of the individual feed items. (in the extension for version 1.18, r92408) This is breaking the example on the article page [1] and, of course, my site too, because there is more than one feed item returned but the rendering templates are sandwiched together.

I'd expect the template Template:RSSPost to be called with line breaks in between.

Otherwise, the documentation and the example template should be updated to include forced whitespace in the template (perhaps with the <noinclude /> tag) but this a clumsy workaround. (See meta:Help:Newlines and spaces if you are interested in implementing this workaround. It worked for me.)

--Martinship 02:45, 26 January 2012 (UTC)Reply

This was intended for special applications, so that you have full control how feeds are rendered with template. --Wikinaut 07:18, 26 January 2012 (UTC)Reply
I can see how the current method might be useful, perhaps for tables. But the example is still broken. --Martinship 03:25, 27 January 2012 (UTC)Reply
Ok, thank you for pointing me to this problem, now I saw it and fixed the template on MediaWiki and added one newline where no newline was present before which was intended due to Bug 19226. Otherwise you would see two new lines between feed items. The new behaviour looks okay and is a positive consequence of the fix in Bug 19226, rendered feeds looks okay now. I will check further consequences and will commit a new version of the the template to SVN in the next days - if this is needed. --Wikinaut 07:43, 27 January 2012 (UTC)Reply
Return to "RSS/Archive 1" page.