* Let users enter an image name for the logo, and then click a button to have it converted to a thumbnail URL.
return '<u#>'.wfMsgExt( 'removedwatchtext', array( 'parse' ), $title->getPrefixedText() );
}
}
+
+/**
+ * Called in some places (currently just extensions)
+ * to get the thumnail URL for a given file at a given resolution.
+ */
+function wfAjaxGetThumbnailUrl( $file, $width, $height ) {
+ $file = wfFindFile( $file );
+
+ if ( !$file || !$file->exists() )
+ return null;
+
+ $url = $file->getThumbnail( $width, $height )->url;
+
+ return $url;
+}
\ No newline at end of file
* List of Ajax-callable functions.
* Extensions acting as Ajax callbacks must register here
*/
-$wgAjaxExportList = array( );
+$wgAjaxExportList = array( 'wfAjaxGetThumbnailUrl' );
/**
* Enable watching/unwatching pages using AJAX.