Extension talk:PageImages

Jump to navigation Jump to search

About this board

Draceane (talkcontribs)

Hello, is there any option to skip some images (e. g. from sidebar)? These aren't very representative at all...

Reply to "Loading image from sidebar"
79.212.8.102 (talkcontribs)

I would like to use the Extension to insert in a template. So a reference-link could Show the and a Image.

Is there any tag or ability to make this happen with this Extension?

Reply to "Tag useage of the Exstension"

Manually trigger LinksUpdate on all Aritcles

4
Mojoaxel (talkcontribs)

The Extension works fine and I'm very happy with it. The question now is how to trigger the Plugin on all Articles. At the moment only images are shown after I changes an Article.

Is there a way to trigger LinksUpdate on all Articles manually?

Varlin (talkcontribs)

+1. It would be a basic feature...

46.164.5.51 (talkcontribs)

Hey, it is possible to do it manually. I am currently having MediaWiki 1.31.

To manually trigger this for all articles you have to start the initImageData.php in extensions/PageImages/maintenance/ folder. I do not have shell/ssh support on my provider, so I had to use MaintenanceShell extension and change the $wgMaintenanceShellPath to the mentioned path.

It looks like there is also some problem (at least on my server) with the script and I couldnt get it work properly. After some debugging I saw that I had to change LinksUpdateHookHandler.php (in PageImages/includes/) the following:

$rev = $linksUpdate->getRevision();

with:

$rev = Revision::newFromTitle($linksUpdate->getTitle());

And I managed to get all images on preview (using the Popups/PagePreviews extension)

Hope it helps someone

Pastakhov (talkcontribs)

thanks

Reply to "Manually trigger LinksUpdate on all Aritcles"
Bryandamon (talkcontribs)

After installing, none of my page images get added, and when I run PageImages/maintenance/initImageData.php I get the following warnings:

PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /htdocs/extensions/PageImages/includes/ParserFileProcessingHookHandlers.php on line 123
PHP Warning: array_flip(): Can only flip STRING and INTEGER values! in /htdocs/extensions/PageImages/includes/ParserFileProcessingHookHandlers.php on line 123

Reply to "PHP Warning on MW 1.31"

Exclude images in <ref> tags from being used.

1
174.82.103.15 (talkcontribs)

Annoyingly several pages use images placed inside references as the page image. I have tried to put these in blacklists or otherwise force the first image to be selected, however it would be nice to exclude images from references.

Reply to "Exclude images in <ref> tags from being used."
Geraki (talkcontribs)

So, is there any chance for including Open Graph in the page itself?

<meta property="og:image" content="http://example.com/w/images/thumb/7/70/Example.png/48px-Example.png" />

I hope so.

MaxSem (talkcontribs)

Frankly, I'm a bit wary of adding more cruft to page HTML. Is there a demand for this?

Nemo bis (talkcontribs)

If that's really used by Facebook I must say that I hate it, but from a MediaWiki/Wikimedia perspective making pages look better when linked on it seems enough of a good reason.

Geraki (talkcontribs)

It seems essential if we prefer that links to Wiki[pm]edia pages are presented with an appropriate thumbnail instead of the mediawiki logo or 'featured article' sign.

In fact it will be helpful not only to wikipedia but to every wiki, so at least there should be an option to enable/disable it.

Florianschmidtwelzow (talkcontribs)

The Open Graph Extension adds an image for og:image, using the MainImage of $out (mMainImage). Maybe the developer can use the Image of pageImages, that is much better as the first main Image on page :)

Nemo bis (talkcontribs)

Yes, we've seen quite a demand for this lately and it would be nice.

Hollosch (talkcontribs)

Hi, have you found a solution to including the og:image property?

Stefahn (talkcontribs)

Just came across this. You can add an og:image to your site by the following code in your LocalSettings.php:

$wgHooks['BeforePageDisplay'][] ='MyFunction';
function MyFunction(&$out, &$skin) {
    $script = "<meta property='og:image' content='/pics/YourPic.png'>";
    $out->addHeadItem("My script", $script);
    return true;

};

Be aware that this will set YourPic.png as og:image in all of your pages.

If you want to set og:image only on your Main page see User:Stefahn/Docu#Get_the_title_of_a_page.

Reply to "Open Graph image?"

Image inside RandomSelection (aka <choose>) always selected over other images

1
Ciencia Al Poder (talkcontribs)

I'm writing this here in case someone has the same problem

On our main page, we had a section that varies randomly with Extension:RandomSelection, and for some unknown reason, the image chosen was always an image from the random selection instead of the logo of our wiki that was placed at the start of the page.

We had to add the logo inside another random selection (with just one option) to make it selectable by the PageImages extension.

Reply to "Image inside RandomSelection (aka <choose>) always selected over other images"
Loman87 (talkcontribs)

Hi,

I have installed the extension, I can see it in Version and I can see the API property in the API sandbox. However I can't see any images preview and anything in page information too. My wiki runs also PopUps and TextExtracts (and this one works fine). Probably I am missing something very easy but I can't guess what...

Varlin (talkcontribs)

Same problem. If I understand the problem, a page needs to be changed before the information on the image is stored and able to be used by popups. So this is linked to the other issue below : "Manually trigger LinksUpdate on all Aritcles"

Reply to "Installation issue"
Theluke907 (talkcontribs)

Hi,

I have installed it and now I have the Problem that only one Article shows an Image if I hover over the link.

Can anybody help me?

All resolutions are nearly the same and have the same name as the Page.

Reply to "No more Image?"

Why some articles with images don't return any images?

2
NH35 (talkcontribs)
Blahma (talkcontribs)

I think that is because the first article is a gallery, not regular pictures embedded in the page.

Reply to "Why some articles with images don't return any images?"