2007-08-22 19:25:22 +00:00
|
|
|
<?php
|
2007-08-26 14:39:17 +00:00
|
|
|
/** \file
|
|
|
|
* \brief Contains setup code for the Contribution Scores Extension.
|
|
|
|
*/
|
|
|
|
|
2007-08-22 19:25:22 +00:00
|
|
|
# Not a valid entry point, skip unless MEDIAWIKI is defined
|
|
|
|
if (!defined('MEDIAWIKI')) {
|
2007-11-27 13:38:37 +00:00
|
|
|
echo "Contribution Scores extension";
|
|
|
|
exit(1);
|
2007-08-22 19:25:22 +00:00
|
|
|
}
|
2007-11-27 13:38:37 +00:00
|
|
|
|
2007-08-22 19:25:22 +00:00
|
|
|
$wgExtensionCredits['specialpage'][] = array(
|
2007-11-27 13:38:37 +00:00
|
|
|
'name'=>'Contribution Scores',
|
|
|
|
'url'=>'http://www.mediawiki.org/wiki/Extension:Contribution_Scores',
|
2007-11-27 20:29:24 +00:00
|
|
|
'author'=>'Tim Laqua',
|
2007-11-27 13:38:37 +00:00
|
|
|
'description'=>'Polls wiki database for highest user contribution volume',
|
|
|
|
'version'=>'1.5'
|
2007-08-22 19:25:22 +00:00
|
|
|
);
|
2007-11-27 13:38:37 +00:00
|
|
|
|
2007-11-27 20:51:59 +00:00
|
|
|
$wgAutoloadClasses['ContributionScores'] = dirname( __FILE__ ) . '/ContributionScores_body.php';
|
2007-08-22 19:25:22 +00:00
|
|
|
$wgSpecialPages['ContributionScores'] = 'ContributionScores';
|
2007-11-27 20:29:24 +00:00
|
|
|
|
|
|
|
if( version_compare( $wgVersion, '1.12alpha', '>=' ) ) {
|
2007-11-27 20:51:59 +00:00
|
|
|
$wgExtensionMessagesFiles['ContributionScores'] = dirname(__FILE__) . '/ContributionScores.i18n.php';
|
2007-11-27 20:29:24 +00:00
|
|
|
} else {
|
|
|
|
$wgExtensionFunctions[] = 'efContributionScores';
|
|
|
|
}
|
|
|
|
|
|
|
|
///Message Cache population for versions that did not support $wgExtensionFunctions
|
|
|
|
function efContributionScores() {
|
|
|
|
global $wgMessageCache;
|
|
|
|
|
|
|
|
#Add Messages
|
|
|
|
require( dirname( __FILE__ ) . '/ContributionScores.i18n.php' );
|
|
|
|
foreach( $messages as $key => $value ) {
|
|
|
|
$wgMessageCache->addMessages( $messages[$key], $key );
|
|
|
|
}
|
|
|
|
}
|