Extension talk:RandomImageByCategory

About this board

Limited subset of images

4
109.186.142.37 (talkcontribs)

I'm using the extension for displaying pdf image from a category with about 50 images. For some reason only a small subset of images is ever displayed, perhaps 10.

Any idea what might be causing this strange phenomenon?

109.186.142.37 (talkcontribs)

MW 1.40 if it matters

Clump (talkcontribs)

I've no special knowledge of the extension, but from a quick look at the code the limit parameter has a default of 10 if it is not set.

109.186.142.37 (talkcontribs)

That was it! thanks.

Reply to "Limited subset of images"
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
Return to "RandomImageByCategory" page.