Extension talk:RandomImageByCategory

About this board

Mdyug (talkcontribs)

<randomimagebycategory width="200" categories="Cats","Dogs"/>
Please tell me this entry will be correct if there are several categories? For some reason, nothing is displayed for me, maybe there is some minimum to start showing images in the category?

Reply to "Some categories"

This extension is actual for MW 1.36.0 ?

1
This post was hidden by Mdyug (history)
أحمد (talkcontribs)

It would be very useful to implement this as a parser function that returns just the file name so that it can be used as part of wikitext to make beautiful things :)

Reply to "Parser function?"

HTTP 500 Internal Server Error

1
202.37.17.146 (talkcontribs)

We installed this on our internal wiki but when we try and use it we get an 'HTTP 500 Internal Server Error' - any ideas?

Other pages are not affected, just once we add the parser to the page with a valid category.

Reply to "HTTP 500 Internal Server Error"

Some dirty hack code correction

1
212.66.42.186 (talkcontribs)

"FancyBoxThumb"-like extensions does not work on images, selected by RandomImageByCategory. Some dirty hack had to be done to make it work (doesn't tested on security issue, perfomance, image options etc. - it just works).

in RandomImageByCategory.php find:

$thumbnail = "<a href=\"{$image_title->escapeFullURL()}\">{$thumb_image->toHtml()}</a>";

and replace to:

$thumbnail = "<a class=\"image fancybox\" href=\"{$image_title->escapeFullURL()}\">" .preg_replace("/<img/","<img class=\"thumbimage\"/",$thumb_image->toHtml()) ."</a>";

Reply to "Some dirty hack code correction"
There are no older topics