Add extension.json master
authorPlatonides <platonides@gmail.com>
Wed, 10 Jan 2018 22:37:08 +0000 (23:37 +0100)
committerPlatonides <platonides@gmail.com>
Wed, 10 Jan 2018 22:37:08 +0000 (23:37 +0100)
HomePageWMES.php
extension.json [new file with mode: 0644]

index b68b4445aa28999472842830e0d629a355e98197..a83995908452aa14dc982c9ddedd1f39bb0427d9 100644 (file)
@@ -1,11 +1,15 @@
 <?php
 
 <?php
 
-$wgAutoloadClasses['HomePageWMES'] = __DIR__ . "/HomePageWMES_body.php";
-$wgHooks['ParserFirstCallInit'][] = 'HomePageWMES::setupHook';
+if ( function_exists( 'wfLoadExtension' ) ) {
+       wfLoadExtension( 'HomePageWMES' );
+} else {
+       $wgAutoloadClasses['HomePageWMES'] = __DIR__ . "/HomePageWMES_body.php";
+       $wgHooks['ParserFirstCallInit'][] = 'HomePageWMES::setupHook';
 
 
-$wgResourceModules['ext.homepage-wmes'] = array(
-  'scripts' => 'js/home.js',
-  'styles' => 'style.css',
-  'localBasePath' => dirname( __FILE__ ),
-  'remoteExtPath' => 'HomePageWMES'
-);
+       $wgResourceModules['ext.homepage-wmes'] = array(
+         'scripts' => 'js/home.js',
+         'styles' => 'style.css',
+         'localBasePath' => dirname( __FILE__ ),
+         'remoteExtPath' => 'HomePageWMES'
+       );
+}
diff --git a/extension.json b/extension.json
new file mode 100644 (file)
index 0000000..80117ef
--- /dev/null
@@ -0,0 +1,26 @@
+{
+       "name": "HomePageWMES",
+       "type": "parserhook",
+       "author": "Platonides",
+       "version": "3.0",
+       "license-name": "GPL-2.0-or-later",
+       "description": "Muestra la portada de Wikimedia EspaƱa",
+       "AutoloadClasses": {
+               "HomePageWMES": "HomePageWMES_body.php"
+       },
+       "ResourceModules": {
+               "ext.homepage-wmes": {
+                       "scripts": "js/home.js",
+                       "styles": "style.css"
+               }
+       },
+       "ResourceFileModulePaths": {
+               "localBasePath": "",
+               "remoteExtPath": "HomePageWMES"
+       },
+       "Hooks": {
+               "ParserFirstCallInit": "HomePageWMES::setupHook"
+       },
+
+       "manifest_version": 1
+}