r72802 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72801‎ | r72802 | r72803 >
Date:13:04, 11 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r72640
Modified paths:
  • /trunk/extensions/SlimboxThumbs/SlimboxThumbs.php (modified) (history)
  • /trunk/extensions/SlimboxThumbs/SlimboxThumbs_Settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SlimboxThumbs/SlimboxThumbs.php
@@ -108,12 +108,13 @@
109109 /* Add javacsripts and stylesheets */
110110 function efSBTAddScripts( $out ) {
111111 global $slimboxThumbsFilesDir, $hasGallery;
112 - // we don't want to load jQuery if there's no gallery here
113 - if ( !$hasGallery ) return false;
 112+
 113+ // We don't want to load jQuery if there's no gallery here.
 114+ //if ( !$hasGallery ) return false;
114115
115116 $out->addScript( '<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>' . "\n" );
116117 $out->addScript( '<script type="text/javascript" src="' . $slimboxThumbsFilesDir . '/js/slimbox2.js"></script>' . "\n" );
117 - $out->addStyle( $slimboxThumbsFilesDir . '/css/slimbox2.css', 'screen' );
 118+ $out->addExtensionStyle( $slimboxThumbsFilesDir . '/css/slimbox2.css', 'screen' );
118119
119120 // use thumb.php to resize pictures if browser window is smaller than the picture itself
120121 $out->addInlineScript( '$(document).ready(function(){
Index: trunk/extensions/SlimboxThumbs/SlimboxThumbs_Settings.php
@@ -17,4 +17,8 @@
1818 $slimboxDefaultWidth = 680;
1919
2020 # Path of the Slimbox directory (string).
21 -$slimboxThumbsFilesDir = dirname( __FILE__ ) . '/slimbox';
\ No newline at end of file
 21+$useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath;
 22+$slimboxThumbsFilesDir = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SlimboxThumbs';
 23+unset( $useExtensionPath );
 24+
 25+$slimboxThumbsFilesDir .= '/slimbox';
\ No newline at end of file

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r72640Added i18n file, stylized, fixed some naming conventions, added settings file...jeroendedauw10:58, 9 September 2010

Status & tagging log