Adding working proof of concept for quick geo ip redirection
[lhc/web/wiklou.git] / extensions / GeoLite / GeoLite.php
1 <?php
2
3 # Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly.
4 if ( !defined( 'MEDIAWIKI' ) ) {
5 echo <<<EOT
6 To install my extension, put the following line in LocalSettings.php:
7 require_once( "\$IP/extensions/ContributionReporting/ContributionReporting.php" );
8 EOT;
9 exit( 1 );
10 }
11
12 $wgLandingPageBase = 'http://wikimediafoundation.org/wiki/Support_Wikipedia';
13
14 $wgKnownLandingPages = array( 'US' => 'en',
15 'DE' => '',
16 'PL' => ''
17 ); # Which Chapters actually have landing pages
18
19 $wgExtensionCredits['specialpage'][] = array(
20 'path' => __FILE__,
21 'name' => 'GeoLite',
22 'url' => 'http://www.mediawiki.org/wiki/Extension:GeoLite',
23 'author' => array( 'Tomasz Finc' ),
24 'descriptionmsg' => 'geolite-desc',
25 );
26
27 $dir = dirname( __FILE__ ) . '/';
28
29 $wgAutoloadClasses['SpecialGeoLite'] = $dir . 'GeoLite_body.php';
30 $wgExtensionMessagesFiles['GeoLite'] = $dir . 'GeoLite.i18n.php';
31 $wgSpecialPages['GeoLite'] = 'SpecialGeoLite';
32 $wgSpecialPageGroups['GeoLite'] = 'contribution';
33
34 ?>