Jump to content

Topic on Extension talk:Popups/Flow

Can I change ratio requirements for Popups?

9
Summary by Thiemo Kreuz (WMDE)
Rhonda1311 (talkcontribs)

I've read that the ratio requirements for an image to work with popups is 1:2 or 2:1. Can this be changed? My images are square and are not showing up in the popups. I found a post that said the $wgPageImagesScores['ratio'] and $wgPageImagesScores['width'] options were configurable but I don't know how to configure them. I assume it would go in the LocalSettings.php but that's as far as I got.

The images I have to post were already sized to 300x300 px so I really don't have the option to resize them.

Any suggestions would be appreciated.

Thiemo Kreuz (WMDE) (talkcontribs)

I tried it myself and was able to track the issue down. Unfortunately, changing the PageImages configuration doesn't help. The Popups extension currently refuses to show landscape images (square images are considered landscape as well) that are less than 320 pixels wide. These numbers are currently hard-coded, i.e. there is no configuration for this. However, I realized it should be possible to show such images in portrait mode. I uploaded a patch that changes the code accordingly: https://gerrit.wikimedia.org/r/636629

Rhonda1311 (talkcontribs)

Kool!


Can I just replace the updated files?

Thiemo Kreuz (WMDE) (talkcontribs)

If it's your own server, sure, you can try.

Rhonda1311 (talkcontribs)

Well that didn't work. :)

So how do I update the plugin?

Thiemo Kreuz (WMDE) (talkcontribs)

All you need is – in theory – the file `extensions/Popups/resources/dist/index.js`. Do you get some error message?

Rhonda1311 (talkcontribs)
Thiemo Kreuz (WMDE) (talkcontribs)
Rhonda1311 (talkcontribs)

Well it's working now and that's all that matters. :)

Thank you so much!