mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-23 16:06:45 +00:00
Version bump, revert PHP files back to their previous states, remove unecessary headers from CSS and JS.
This commit is contained in:
parent
efb3e6d31c
commit
d533633668
|
@ -1,33 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* Tabber Hooks
|
||||
* Tabber
|
||||
* Tabber Hooks Class
|
||||
*
|
||||
* @author Eric Fortin, Alexia E. Smith, Kris Blair
|
||||
* @author Eric Fortin, Alexia E. Smith
|
||||
* @license GPL
|
||||
* @package Tabber
|
||||
* @link https://www.mediawiki.org/wiki/Extension:Tabber
|
||||
*/
|
||||
*
|
||||
**/
|
||||
|
||||
class TabberHooks {
|
||||
/**
|
||||
* Sets up this extension's parser functions
|
||||
* Sets up this extension's parser functions.
|
||||
*
|
||||
* @access public
|
||||
* @param object Parser object passed as a reference
|
||||
* @return boolean True
|
||||
* @param object Parser object passed as a reference.
|
||||
* @return boolean true
|
||||
*/
|
||||
static public function onParserFirstCallInit(Parser &$parser) {
|
||||
$parser->setHook('tabber', 'TabberHooks::renderTabber');
|
||||
$parser->setHook("tabber", "TabberHooks::renderTabber");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the necessary HTML for a <tabber> tag
|
||||
* Renders the necessary HTML for a <tabber> tag.
|
||||
*
|
||||
* @access public
|
||||
* @param string The input URL between the beginning and ending tags
|
||||
* @param array Array of attribute arguments on that beginning tag
|
||||
* @param string The input URL between the beginning and ending tags.
|
||||
* @param array Array of attribute arguments on that beginning tag.
|
||||
* @param object Mediawiki Parser Object
|
||||
* @param object Mediawiki PPFrame Object
|
||||
* @return string HTML
|
||||
|
@ -35,18 +37,18 @@ class TabberHooks {
|
|||
static public function renderTabber($input, array $args, Parser $parser, PPFrame $frame) {
|
||||
$parser->getOutput()->addModules('ext.Tabber');
|
||||
|
||||
$arr = explode('|-|', $input);
|
||||
$arr = explode("|-|", $input);
|
||||
foreach ($arr as $tab) {
|
||||
$htmlTabs .= self::buildTab($tab, $parser);
|
||||
}
|
||||
|
||||
$HTML = "<div class='tabber'>{$htmlTabs}</div>";
|
||||
$HTML = '<div class="tabber">'.$htmlTabs."</div>";
|
||||
|
||||
return $HTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build individual tab
|
||||
* Build individual tab.
|
||||
*
|
||||
* @access private
|
||||
* @param string Tab information
|
||||
|
@ -63,9 +65,10 @@ class TabberHooks {
|
|||
$tabName = array_shift($args);
|
||||
$tabBody = $parser->recursiveTagParse(implode('=', $args));
|
||||
|
||||
$tab = "<div class='tabbertab' title='" . htmlspecialchars($tabName) . "'>
|
||||
<p>{$tabBody}</p>
|
||||
</div>";
|
||||
$tab = '
|
||||
<div class="tabbertab" title="'.htmlspecialchars($tabName).'">
|
||||
<p>'.$tabBody.'</p>
|
||||
</div>';
|
||||
|
||||
return $tab;
|
||||
}
|
||||
|
|
35
Tabber.php
35
Tabber.php
|
@ -1,39 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* Tabber
|
||||
* Tabber Main File
|
||||
*
|
||||
* @author Eric Fortin, Alexia E. Smith, Kris Blair
|
||||
* @author Eric Fortin, Alexia E. Smith
|
||||
* @license GPL
|
||||
* @package Tabber
|
||||
* @link https://www.mediawiki.org/wiki/Extension:Tabber
|
||||
*/
|
||||
*
|
||||
**/
|
||||
|
||||
/*****************************************/
|
||||
/* Credits */
|
||||
/*****************************************/
|
||||
/******************************************/
|
||||
/* Credits */
|
||||
/******************************************/
|
||||
$credits = [
|
||||
'path' => __FILE__,
|
||||
'name' => 'Tabber',
|
||||
'author' => ['Eric Fortin', 'Alexia E. Smith', 'Curse Inc. Wiki Platform Team', 'Kris Blair'],
|
||||
'author' => ['Eric Fortin', 'Alexia E. Smith', 'Curse Inc. Wiki Platform Team'],
|
||||
'url' => 'https://www.mediawiki.org/wiki/Extension:Tabber',
|
||||
'descriptionmsg' => 'tabber-desc',
|
||||
'version' => '2.1'
|
||||
'version' => '2.2'
|
||||
];
|
||||
$wgExtensionCredits['parserhook'][] = $credits;
|
||||
|
||||
/*****************************************/
|
||||
/* Language Strings, Page Aliases, Hooks */
|
||||
/*****************************************/
|
||||
$extDir = __DIR__ . '/';
|
||||
|
||||
$wgMessagesDirs['Tabber'] = "{$extDir}/i18n";
|
||||
$wgExtensionMessagesFiles['Tabber'] = "{$extDir}/Tabber.i18n.php";
|
||||
/******************************************/
|
||||
/* Language Strings, Page Aliases, Hooks */
|
||||
/******************************************/
|
||||
$extDir = __DIR__.'/';
|
||||
|
||||
$wgAutoloadClasses['TabberHooks'] = "{$extDir}/Tabber.hooks.php";
|
||||
$wgMessagesDirs['Tabber'] = "{$extDir}/i18n";
|
||||
$wgExtensionMessagesFiles['Tabber'] = "{$extDir}/Tabber.i18n.php";
|
||||
|
||||
$wgHooks['ParserFirstCallInit'][] = 'TabberHooks::onParserFirstCallInit';
|
||||
$wgAutoloadClasses['TabberHooks'] = "{$extDir}/Tabber.hooks.php";
|
||||
|
||||
$wgResourceModules['ext.Tabber'] = [
|
||||
$wgHooks['ParserFirstCallInit'][] = 'TabberHooks::onParserFirstCallInit';
|
||||
|
||||
$wgResourceModules['ext.Tabber'] = [
|
||||
'localBasePath' => __DIR__,
|
||||
'remoteExtPath' => 'Tabber',
|
||||
'styles' => ['css/tabber.css'],
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
/*
|
||||
* Tabber CSS
|
||||
* Copied from http://www.barelyfitz.com/projects/tabber/example.css used under MIT license
|
||||
*
|
||||
* @author Eric Fortin, Alexia E. Smith, Kris Blair
|
||||
* @license GPL
|
||||
* @package Tabber
|
||||
* @link https://www.mediawiki.org/wiki/Extension:Tabber
|
||||
*
|
||||
* @see http://www.barelyfitz.com/projects/tabber/
|
||||
*/
|
||||
|
||||
ul.tabbernav {
|
||||
margin: 0;
|
||||
padding: 3px 0;
|
||||
|
|
11
js/tabber.js
11
js/tabber.js
|
@ -1,13 +1,4 @@
|
|||
/**
|
||||
* Tabber JS
|
||||
*
|
||||
* @author Alexia E. Smith, Kris Blair
|
||||
* @license GPL
|
||||
* @package Tabber
|
||||
* @link https://www.mediawiki.org/wiki/Extension:Tabber
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
(function($) {
|
||||
$.fn.tabber = function() {
|
||||
return this.each(function() {
|
||||
// create tabs
|
||||
|
|
Loading…
Reference in a new issue