Jump to content

User talk:Alxndr/RSS

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 17 years ago by Greudin in topic Warning with unicode title ?

Install Helps

[edit]

After saving the code as rss.php, be sure to change all french double guillements to double quotes - that is change all « to " - also, remember that magpierss is not installed - do not follow its installation instructions. Just put those files into your /extensions directory. If you like, put them into a /magpierss subdirectory, but if you do be sure to change the line in LocalSettings.php accordingly.

A tip to install would be nice

[edit]

1.90

[edit]

I see a note about this geing upgraded to work with 1.90, but the script has not been changed. It still uses the obsolete wfstrencode command in the disablecache portion. Can someone fix the script?

Fix for inclusion of searches on Blogger

[edit]

This is needed to parse the format returned by search.blogger.com:

change the two lines at line 156

$pubdate = trim(iconv($charset,$wgOutputEncoding,$item['pubdate']));
$pubdate = date("d.M. H:i",strtotime($pubdate));

to the following:

      $pubdate = ;
      if (strlen($item['pubdate']) > 0) {
              $pubdate = strtotime(trim(iconv($charset,$wgOutputEncoding,$item['pubdate'])));
      } else {
              if (strlen($item['dc']['date']) > 0) {
                      $str = trim(iconv($charset,$wgOutputEncoding,$item['dc']['date']));
                      # format: 2006-12-27T09:12:02Z
                      $pubdate = mktime(substr($str, 11, 2), substr($str, 14, 2), substr($str, 17, 2),
                                        substr($str, 5, 2), substr($str, 8, 2), substr($str, 0, 4));
                      #debug print($item['dc']['date'] . '(' . $str . '->' . $pubdate . ' -> ' . date('Y-m-d H:i', $pubdate) . '!!!');
              }
      }
      if (strlen($pubdate) > 0) {
              $pubdate = date('Y-m-d H:i', $pubdate);
      } else {
              $pubdate = 'N/A';
      }

Shari 17:41, 16 March 2007 (UTC)Reply

Warning with unicode title ?

[edit]

Under Mediawiki 1.9.3 FreeBSD, I used a tag like that :

Extension:RSS -- Error: "http://www.......com/rss2.php%7Ccharset=UTF-8%7Cshort%7Cdate%7Cmax=5" is not in the list of allowed feeds. The allowed feeds are as follows: https://tagteam.harvard.edu/hubs/wmde-policy/items.rss and https://diff.wikimedia.org/feed/.

But iconv returns an error and title is not showed properly (stripped when à, è or ' occurs in title)

iconv() [<a href='function.iconv'>function.iconv</a>]: Detected an illegal character in input string  in /home/..../extensions/rss.php on line 202

any clue ? :) Greudin 22:01, 2 May 2007 (UTC)Reply