Extension talk:RandomImage/Archive

Please submit bug reports and feature requests for this extension to the extension's maintainer, Rob Church, via email.

Method renderHook not loading
An email was sent to Rob Church, this is just to document the bug and provide a fix.

When installed and tested on MediaWiki 1.10.0, and 1.11.0, the extension would not render an imagebox and provided the following warning: Warning: call_user_func_array [function.call-user-func-array]: Unable to call RandomImage::renderHook in ${IP}/mediawiki-1.11.1/includes/Parser.php on line 626

The fault appears to be in the declaration of the renderHook method on line 48 of RandomImage.php If you modify;

to; the method becomes accessible and the extension works. --Zven 01:55, 12 February 2008 (UTC)

Empty captions
If the is not used and there is no starting paragraph the image rendering will screw up the page. This seems to be because a caption defined as an empty character or spaces  will get stripped out by the method removeMagnifier when it removes the div tags , in the process creating a div tag that looks like this; This tag is malformed and depending on the content can cause the left side bar to screw up. Caption content is defined in the method getCaption;

Instead of defining spaces as ' ', a UTF-8 character '&&#35;32;' seems to work. I modified this function to which checks that the $text is not empty and sends the UTF-8 character instead of empty or spaces that get stripped forming a div tag like this; --Zven 11:13, 12 February 2008 (UTC)