2010-07-22 22:07:15 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2010-07-23 15:26:27 +00:00
|
|
|
* RSS-Feed MediaWiki extension
|
2010-07-23 14:14:05 +00:00
|
|
|
*
|
2010-07-23 15:26:27 +00:00
|
|
|
* @file
|
2010-07-23 14:01:46 +00:00
|
|
|
* @ingroup Extensions
|
2010-11-05 00:59:28 +00:00
|
|
|
* @version 1.8
|
2010-07-23 15:26:27 +00:00
|
|
|
* @author mutante, Daniel Kinzler, Rdb, Mafs, Alxndr, Chris Reigrut, K001
|
|
|
|
* @author Kellan Elliott-McCrea <kellan@protest.net> -- author of MagpieRSS
|
|
|
|
* @author Jeroen De Dauw
|
|
|
|
* @author Jack Phoenix <jack@countervandalism.net>
|
|
|
|
* @copyright © Kellan Elliott-McCrea <kellan@protest.net>
|
|
|
|
* @copyright © mutante, Daniel Kinzler, Rdb, Mafs, Alxndr, Chris Reigrut, K001
|
|
|
|
* @link http://www.mediawiki.org/wiki/Extension:RSS Documentation
|
2010-07-22 22:07:15 +00:00
|
|
|
*/
|
2010-07-23 14:14:05 +00:00
|
|
|
|
2010-10-20 18:28:47 +00:00
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
2010-07-22 22:07:15 +00:00
|
|
|
die( "This is not a valid entry point.\n" );
|
|
|
|
}
|
2010-07-23 14:14:05 +00:00
|
|
|
|
2010-07-23 15:26:27 +00:00
|
|
|
// Extension credits that will show up on Special:Version
|
2010-07-22 22:07:15 +00:00
|
|
|
$wgExtensionCredits['parserhook'][] = array(
|
|
|
|
'name' => 'RSS feed',
|
2010-07-23 14:14:05 +00:00
|
|
|
'author' => array(
|
2010-07-23 15:26:27 +00:00
|
|
|
'Kellan Elliott-McCrea',
|
2010-07-23 14:01:46 +00:00
|
|
|
'mutante',
|
2010-07-23 15:26:27 +00:00
|
|
|
'Daniel Kinzler',
|
2010-07-23 14:01:46 +00:00
|
|
|
'Rdb',
|
|
|
|
'Mafs',
|
|
|
|
'Alxndr',
|
|
|
|
'Wikinaut',
|
2010-07-23 15:26:27 +00:00
|
|
|
'Chris Reigrut',
|
2010-07-23 14:01:46 +00:00
|
|
|
'K001',
|
2010-07-23 15:26:27 +00:00
|
|
|
'Jack Phoenix',
|
2010-10-19 22:28:12 +00:00
|
|
|
'Jeroen De Dauw',
|
|
|
|
'Mark A. Hershberger'
|
2010-07-23 14:01:46 +00:00
|
|
|
),
|
2011-05-14 15:10:40 +00:00
|
|
|
'version' => '1.9',
|
2010-07-22 22:07:15 +00:00
|
|
|
'url' => 'http://www.mediawiki.org/wiki/Extension:RSS',
|
2010-07-23 08:02:27 +00:00
|
|
|
'descriptionmsg' => 'rss-desc',
|
2010-07-22 22:07:15 +00:00
|
|
|
);
|
2010-07-23 14:14:05 +00:00
|
|
|
|
2010-07-23 15:26:27 +00:00
|
|
|
// Internationalization file and autoloadable classes
|
|
|
|
$dir = dirname( __FILE__ ) . '/';
|
|
|
|
$wgExtensionMessagesFiles['RSS'] = $dir . 'RSS.i18n.php';
|
2010-11-04 23:19:00 +00:00
|
|
|
$wgAutoloadClasses['RSSHooks'] = $dir . 'RSSHooks.php';
|
|
|
|
$wgAutoloadClasses['RSSParser'] = $dir . 'RSSParser.php';
|
2010-10-19 21:54:53 +00:00
|
|
|
$wgAutoloadClasses['RSSData'] = $dir . 'RSSData.php';
|
2010-07-23 08:02:27 +00:00
|
|
|
|
2010-11-04 23:19:00 +00:00
|
|
|
$wgHooks['ParserFirstCallInit'][] = 'RSSHooks::parserInit';
|
2010-11-01 16:25:04 +00:00
|
|
|
|
|
|
|
$wgRSSCacheAge = 3600; // one hour
|
2010-11-04 23:19:00 +00:00
|
|
|
$wgRSSCacheCompare = false; // Check cached content, if available, against remote.
|
2011-05-06 16:21:43 +00:00
|
|
|
// $wgRSSCacheCompare should be set to false or a timeout
|
|
|
|
// (less than $wgRSSCacheAge) after which a comparison will
|
|
|
|
// be made.
|
|
|
|
$wgRSSFetchTimeout = 5; // 5 second timeout
|
|
|
|
$wgRSSNamespaces = null; // Ignore the RSS tag in all but the namespaces listed here.
|
|
|
|
// null (the default) means the <rss> tag can be used
|
|
|
|
// anywhere.
|
2010-11-05 00:59:28 +00:00
|
|
|
|
|
|
|
// Agent to use for fetching feeds
|
2011-05-06 16:21:43 +00:00
|
|
|
$wgRSSUserAgent = 'MediaWikiRSS/0.02 (+http://www.mediawiki.org/wiki/Extension:RSS) / MediaWiki RSS extension';
|
2010-11-25 12:38:25 +00:00
|
|
|
|
|
|
|
// Proxy server to use for fetching feeds
|
2011-05-14 15:10:40 +00:00
|
|
|
$wgRSSProxy = false;
|