Skip to content

Commit

Permalink
wiki backup
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekchandan committed Aug 25, 2015
1 parent ad558c2 commit 29d218c
Show file tree
Hide file tree
Showing 456 changed files with 898 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
require_once( "$IP/extensions/DeleteBatch/DeleteBatch.php" );
#require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
require_once( "$IP/extensions/NukeDPL/NukeDPL.php" );
require_once( "$IP/extensions/GoogleAdSense/GoogleAdSense.php");
# Enables use of WikiEditor by default but still allow users to disable it in preferences
#$wgDefaultUserOptions['usebetatoolbar'] = 1;
#$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
Expand Down Expand Up @@ -269,4 +270,9 @@

$wgShowSQLErrors = 1;


//Google Ads
$wgGoogleAdSenseClient = 'ca-pub-9539937655115229';
$wgGoogleAdSenseSlot = '8864913199';
$wgGoogleAdSenseID = 'wiki';
?>
5 changes: 5 additions & 0 deletions extensions/GoogleAdSense/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.svn
*~
*.kate-swp
.*.swp
.idea
6 changes: 6 additions & 0 deletions extensions/GoogleAdSense/.gitreview
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[gerrit]
host=gerrit.wikimedia.org
port=29418
project=mediawiki/extensions/GoogleAdSense
defaultbranch=master
defaultrebase=0
48 changes: 48 additions & 0 deletions extensions/GoogleAdSense/GoogleAdSense.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
/**
* Class file for the GoogleAdSense extension
*
* @file
* @ingroup Extensions
* @author Siebrand Mazeland
* @license MIT
*/

class GoogleAdSense {
static function GoogleAdSenseInSidebar( $skin, &$bar ) {
global $wgGoogleAdSenseWidth, $wgGoogleAdSenseID,
$wgGoogleAdSenseHeight, $wgGoogleAdSenseClient,
$wgGoogleAdSenseSlot, $wgGoogleAdSenseSrc,
$wgGoogleAdSenseAnonOnly;

// Return $bar unchanged if not all values have been set.
// @todo Signal incorrect configuration nicely?
if ( $wgGoogleAdSenseClient == 'none' || $wgGoogleAdSenseSlot == 'none' || $wgGoogleAdSenseID == 'none' )
return $bar;

if ( $skin->getUser()->isLoggedIn() && $wgGoogleAdSenseAnonOnly ) {
return $bar;
}

if ( !$wgGoogleAdSenseSrc ) {
return $bar;
}

// Add CSS
$skin->getOutput()->addModules( 'ext.googleadsense' );

$bar['googleadsense'] = "<script type=\"text/javascript\"><!--
google_ad_client = \"$wgGoogleAdSenseClient\";
/* $wgGoogleAdSenseID */
google_ad_slot = \"$wgGoogleAdSenseSlot\";
google_ad_width = " . intval( $wgGoogleAdSenseWidth ) . ";
google_ad_height = " . intval( $wgGoogleAdSenseHeight ) . ";
// -->
</script>
<script type=\"text/javascript\"
src=\"$wgGoogleAdSenseSrc\">
</script>";

return true;
}
}
35 changes: 35 additions & 0 deletions extensions/GoogleAdSense/GoogleAdSense.i18n.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* This is a backwards-compatibility shim, generated by:
* https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
*
* Beginning with MediaWiki 1.23, translation strings are stored in json files,
* and the EXTENSION.i18n.php file only exists to provide compatibility with
* older releases of MediaWiki. For more information about this migration, see:
* https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
*
* This shim maintains compatibility back to MediaWiki 1.17.
*/
$messages = array();
if ( !function_exists( 'wfJsonI18nShim644ab34231edf9dc' ) ) {
function wfJsonI18nShim644ab34231edf9dc( $cache, $code, &$cachedData ) {
$codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
foreach ( $codeSequence as $csCode ) {
$fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
if ( is_readable( $fileName ) ) {
$data = FormatJson::decode( file_get_contents( $fileName ), true );
foreach ( array_keys( $data ) as $key ) {
if ( $key === '' || $key[0] === '@' ) {
unset( $data[$key] );
}
}
$cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
}

$cachedData['deps'][] = new FileDependency( $fileName );
}
return true;
}

$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShim644ab34231edf9dc';
}
64 changes: 64 additions & 0 deletions extensions/GoogleAdSense/GoogleAdSense.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* MediaWiki extension to add Google AdSense in a portlet in the sidebar.
* Installation instructions can be found on
* http://www.mediawiki.org/wiki/Extension:Google_AdSense_2
*
* This extension will not add the Google Adsense portlet to *any* skin
* that is used with MediaWiki. Because of inconsistencies in the skin
* implementation, it will not be add to the following skins:
* cologneblue, standard, nostalgia
*
* @file
* @ingroup Extensions
* @author Siebrand Mazeland
* @license MIT
*/

if ( !defined( 'MEDIAWIKI' ) ) {
echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
die( 1 );
}

/**
* The following settings must be made in your LocalSettings.php.
*/
$wgGoogleAdSenseClient = 'none'; // Client ID for your AdSense script (example: pub-1234546403419693)
$wgGoogleAdSenseSlot = 'none'; // Slot ID for your AdSense script (example: 1234580893)
$wgGoogleAdSenseID = 'none'; // ID for your AdSense script (example: translatewiki)

/**
* SETTINGS
* - The description of the portlet can be changed in [[MediaWiki:Googleadsense]].
* - The following settings can be overridden in your LocalSettings.php.
* Compare them to the script output in the Google AdSense interface.
*/
$wgGoogleAdSenseWidth = 120; // Width of the AdSense box, specified in your AdSense account
$wgGoogleAdSenseHeight = 240; // Width of the AdSense box, specified in your AdSense account
$wgGoogleAdSenseSrc = "//pagead2.googlesyndication.com/pagead/show_ads.js"; // Protocol relative source URL of the AdSense script
$wgGoogleAdSenseAnonOnly = false; // Show the AdSense box only for anonymous users

$wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'Google AdSense',
'version' => '2.2.0',
'author' => 'Siebrand Mazeland',
'descriptionmsg' => 'googleadsense-desc',
'url' => 'https://www.mediawiki.org/wiki/Extension:Google_AdSense_2',
);

// Register class and localisations
$dir = dirname( __FILE__ ) . '/';
$wgAutoloadClasses['GoogleAdSense'] = $dir . 'GoogleAdSense.class.php';
$wgMessagesDirs['GoogleAdSense'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['GoogleAdSense'] = $dir . 'GoogleAdSense.i18n.php';

// Hook to modify the sidebar
$wgHooks['SkinBuildSidebar'][] = 'GoogleAdSense::GoogleAdSenseInSidebar';

// Client-side resource modules
$wgResourceModules['ext.googleadsense'] = array(
'styles' => 'resources/ext.googleadsense.css',
'localBasePath' => $dir,
'remoteExtPath' => 'GoogleAdSense'
);
22 changes: 22 additions & 0 deletions extensions/GoogleAdSense/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2008 Siebrand Mazeland

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/af.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Naudefj"
]
},
"googleadsense-desc": "Voeg [http://www.google.com/adsense Google AdSense] by die kantstrook by"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/aln.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Mdupont"
]
},
"googleadsense-desc": "Shton [http://www.google.com/adsense Google AdSense] të sidebar"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/anp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Angpradesh"
]
},
"googleadsense-desc": "[http://www.google.com/adsense Google AdSense] कॆ साइड बार मॆ जोङॊ"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/ar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Meno25"
]
},
"googleadsense-desc": "يضيف [http://www.google.com/adsense جوجل أدسنس] إلى الشريط الجانبي"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/arz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Meno25"
]
},
"googleadsense-desc": "يضيف [http://www.google.com/adsense جوجل أدسنس] إلى الشريط الجانبي"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/ast.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Xuacu"
]
},
"googleadsense-desc": "Amiesta [http://www.google.com/adsense Google AdSense] a la barra llateral"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/az.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Khan27"
]
},
"googleadsense-desc": "Yan çubuğa [http://www.google.com/adsense Google AdSense] əlavə edir"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/bar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Man77"
]
},
"googleadsense-desc": "Fügt [http://www.google.com/adsense Google AdSense] zu da Sidebar dazua"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/be-tarask.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Jim-by"
]
},
"googleadsense-desc": "Дадае [http://www.google.com/adsense Google AdSense] ў навігацыйную панэль"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/bg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"DCLXVI"
]
},
"googleadsense-desc": "Добавя [http://www.google.com/adsense Google AdSense] в страничната лента"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/br.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Fulup"
]
},
"googleadsense-desc": "Ouzhpennañ a ra [http://www.google.com/adsense Google AdSense] d'ar varrenn gostez"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/bs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"CERminator"
]
},
"googleadsense-desc": "Dodaje [http://www.google.com/adsense Google AdSense] u alatnu traku"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/ca.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Solde"
]
},
"googleadsense-desc": "Afegeix [http://www.google.com/Google AdSense] a la barra lateral"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/cs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Li-sung"
]
},
"googleadsense-desc": "Přidává do postranního panelu [http://www.google.com/adsense Google AdSense]"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/da.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Byrial"
]
},
"googleadsense-desc": "Tilføjer [http://google.com/adsense Google AdSense] til sidemenuen"
}
9 changes: 9 additions & 0 deletions extensions/GoogleAdSense/i18n/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@metadata": {
"authors": [
"Kghbln",
"MichaelFrey"
]
},
"googleadsense-desc": "Ermöglicht das Einfügen von [http://www.google.com/adsense „Google AdSense“-Anzeigen] in der Seitenleiste"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/diq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Erdemaslancan"
]
},
"googleadsense-desc": "çuwade kosmi re [http://www.google.com/adsense Google AdSense] dekeno de"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/dsb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Michawiki"
]
},
"googleadsense-desc": "Pśidawa [http://www.google.com/adsense Google AdSense] k nabocnej smuze"
}
8 changes: 8 additions & 0 deletions extensions/GoogleAdSense/i18n/dtp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"FRANCIS5091"
]
},
"googleadsense-desc": "Poruhango [http://www.google.com/adsense Guugol RungangPurimon] hilo id barsisi"
}
Loading

0 comments on commit 29d218c

Please sign in to comment.