r82063 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82062‎ | r82063 | r82064 >
Date:17:55, 13 February 2011
Author:kwisatz
Status:deferred
Tags:
Comment:
GeeQuBox trunk now using ResourceLoader and compatible with mw 1.17alpha
Modified paths:
  • /trunk/extensions/GeeQuBox/GeeQuBox.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GeeQuBox/GeeQuBox.php
@@ -21,12 +21,25 @@
2222 $wgExtensionCredits['parserhook'][] = array(
2323 'path' => __FILE__,
2424 'name' => 'GeeQuBox',
25 - 'version' => '0.01',
 25+ 'version' => '0.02',
2626 'author' => array( '[http://www.mediawiki.org/wiki/User:Clausekwis David Raison]' ),
2727 'url' => 'http://www.mediawiki.org/wiki/Extension:GeeQuBox',
2828 'descriptionmsg' => 'geequbox-desc'
2929 );
3030
 31+// see http://www.mediawiki.org/wiki/ResourceLoader/Documentation/Using_with_extensions
 32+$wgResourceModules['ext.GeeQuBox'] = array(
 33+ // JavaScript and CSS styles. To combine multiple file, just list them as an array.
 34+ 'scripts' => 'js/jquery.lightbox-0.5.min.js',
 35+ 'styles' => 'css/jquery.lightbox-0.5.css',
 36+
 37+ // ResourceLoader needs to know where your files are; specify your
 38+ // subdir relative to "extensions" or $wgExtensionAssetsPath
 39+ 'localBasePath' => dirname( __FILE__ ),
 40+ 'remoteExtPath' => 'GeeQuBox'
 41+);
 42+
 43+
3144 // defaults
3245 $wgGqbDefaultWidth = 640;
3346
@@ -83,11 +96,9 @@
8497 global $wgExtensionAssetsPath;
8598
8699 $eDir = $wgExtensionAssetsPath .'/GeeQuBox/';
87 - $this->_page->includeJQuery();
88 - $this->_page->addScript( '<script type="text/javascript" src="'. $eDir .'js/jquery.lightbox-0.5.min.js"></script>' . PHP_EOL );
89 - $this->_page->addExtensionStyle( $eDir . '/css/jquery.lightbox-0.5.css', 'screen' );
 100+ $this->_page->addModules( 'ext.GeeQuBox' );
90101 $this->_page->addInlineScript('$j(document).ready(function(){
91 - $j("div.gallerybox a.image").lightBox({
 102+ $j("li.gallerybox a.image").lightBox({
92103 imageLoading: "'. $eDir .'images/lightbox-ico-loading.gif",
93104 imageBtnClose: "'. $eDir .'images/lightbox-btn-close.gif",
94105 imageBtnPrev: "'. $eDir .'images/lightbox-btn-prev.gif",

Follow-up revisions

RevisionCommit summaryAuthorDate
r84568fix to r82063kwisatz21:49, 22 March 2011

Status & tagging log