mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-27 16:50:00 +00:00
Whitespace fixes
This commit is contained in:
parent
19b7e02bc8
commit
29813fc87a
12
Gadgets.php
12
Gadgets.php
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Gadgets extension - lets users select custom javascript gadgets
|
||||
*
|
||||
*
|
||||
*
|
||||
* For more info see http://mediawiki.org/wiki/Extension:Gadgets
|
||||
*
|
||||
* @package MediaWiki
|
||||
|
@ -17,9 +17,9 @@ if( !defined( 'MEDIAWIKI' ) ) {
|
|||
die( 1 );
|
||||
}
|
||||
|
||||
$wgExtensionCredits['other'][] = array(
|
||||
'name' => 'Gadgets',
|
||||
'author' => 'Daniel Kinzler',
|
||||
$wgExtensionCredits['other'][] = array(
|
||||
'name' => 'Gadgets',
|
||||
'author' => 'Daniel Kinzler',
|
||||
'url' => 'http://mediawiki.org/wiki/Extension:Gadgets',
|
||||
'description' => 'lets users select custom javascript gadgets',
|
||||
);
|
||||
|
@ -75,7 +75,7 @@ function wfLoadGadgetsStructured( $forceNewText = NULL ) {
|
|||
//cached?
|
||||
$gadgets = $wgMemc->get( $key );
|
||||
if ( $gadgets !== NULL ) return $gadgets;
|
||||
|
||||
|
||||
$g = wfMsgForContentNoTrans( "gadgets-definition" );
|
||||
if ( wfEmptyMsg( "gadgets-definition", $g ) ) {
|
||||
$gadgets = false;
|
||||
|
@ -164,7 +164,7 @@ function wfGadgetsRenderPreferencesForm( &$prefs, &$out ) {
|
|||
$ttext = wfMsgExt( $tname, $msgOpt );
|
||||
$checked = @$prefs->mToggles[$tname] == 1 ? ' checked="checked"' : '';
|
||||
$disabled = '';
|
||||
|
||||
|
||||
# NOTE: No label for checkmarks as this causes the checks to toggle
|
||||
# when clicking a link in the describing text.
|
||||
$out->addHtml( "<div class='toggle'><input type='checkbox' value='1' " .
|
||||
|
|
15
README
15
README
|
@ -11,12 +11,12 @@ based "gadgets" that other wiki users provide.
|
|||
<http://mediawiki.org/wiki/Extension:Gadgets>
|
||||
|
||||
The Gadgets extension was originally written by Daniel Kinzler in 2007
|
||||
and is released under the GNU General Public Licence (GPL).
|
||||
and is released under the GNU General Public Licence (GPL).
|
||||
The internationalization files may contain contributions by several people;
|
||||
they should be mentioned in each file individually.
|
||||
|
||||
== Installing ==
|
||||
Copy the Gadgets directory into the extensions folder of your
|
||||
Copy the Gadgets directory into the extensions folder of your
|
||||
MediaWiki installation. Then add the following lines to your
|
||||
LocalSettings.php file (near the end):
|
||||
|
||||
|
@ -37,7 +37,7 @@ Each line in MediaWiki:Gadgets-definition that start with one or more "*"
|
|||
|
||||
That is, each line consists of fields separated by a "|" (pipe) character.
|
||||
The first field ("mygadget" in the example) is the gadgets internal name,
|
||||
and references a system message (MediaWiki:Gadget-mygadget in the example)
|
||||
and references a system message (MediaWiki:Gadget-mygadget in the example)
|
||||
that contains a short description of the gadget, using wiki syntax.
|
||||
Note that the internal name must start with a ASCII letter, and must
|
||||
contain only ASCII letter and numbers, hyphens ("-"), underscores ("_"),
|
||||
|
@ -71,9 +71,8 @@ MediaWiki:Gadget-section-editing-gadgets
|
|||
* Requires MediaWiki 1.11alpha, revision 24477 or later.
|
||||
* Gadgets do not apply to Special:Preferences, so users can always disable
|
||||
any broken gadgets they may have enabled.
|
||||
* Uses BeforePageDisplay hook, thus only works with MonoBook based skins;
|
||||
* Uses BeforePageDisplay hook, thus only works with MonoBook based skins;
|
||||
specifically, does not work with CologneBlue.
|
||||
* Gadget code is included after user code - that means that user JS has no
|
||||
access to things defined in gadgets, and user CSS is overwritten by CSS
|
||||
from gadgets. (pending a better way to insert things into the HTML head)
|
||||
|
||||
* Gadget code is included after user code - that means that user JS has no
|
||||
access to things defined in gadgets, and user CSS is overwritten by CSS
|
||||
from gadgets. (pending a better way to insert things into the HTML head)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Special:Gadgets, provides a preview of MediaWiki:Gadgets.
|
||||
*
|
||||
*
|
||||
* @addtogroup SpecialPage
|
||||
* @author Daniel Kinzler, brightbyte.de
|
||||
* @copyright © 2007 Daniel Kinzler
|
||||
|
@ -17,7 +17,7 @@ if( !defined( 'MEDIAWIKI' ) ) {
|
|||
*
|
||||
*/
|
||||
class SpecialGadgets extends SpecialPage {
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -27,7 +27,7 @@ class SpecialGadgets extends SpecialPage {
|
|||
// inject messages
|
||||
loadGadgetsI18n();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Main execution function
|
||||
* @param $par Parameters passed to the page
|
||||
|
@ -59,17 +59,17 @@ class SpecialGadgets extends SpecialPage {
|
|||
}
|
||||
$wgOut->addHTML( "\n<h2>$ttext [$lnk]</h2>\n" );
|
||||
}
|
||||
|
||||
|
||||
foreach ( $entries as $gname => $code ) {
|
||||
$t = Title::makeTitleSafe( NS_MEDIAWIKI, "Gadget-$gname" );
|
||||
if ( !$t ) continue;
|
||||
|
||||
$lnk = $skin->makeLinkObj( $t, wfMsgHTML("edit") );
|
||||
$ttext = wfMsgExt( "gadget-$gname", $msgOpt );
|
||||
|
||||
|
||||
if( !$listOpen ) {
|
||||
$listOpen = true;
|
||||
$wgOut->addHTML( '<ul>' );
|
||||
$wgOut->addHTML( '<ul>' );
|
||||
}
|
||||
$wgOut->addHTML( "<li>" );
|
||||
$wgOut->addHTML( "$ttext [$lnk]<br/>" );
|
||||
|
@ -97,4 +97,3 @@ class SpecialGadgets extends SpecialPage {
|
|||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
require_once( "{{path}}/Gadgets.php" );
|
||||
|
||||
|
|
Loading…
Reference in a new issue