Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of BeforeParserrenderImageGallery hook... was deprecated in MediaWiki 1.35. #43

Open
The-Voidwalker opened this issue Jul 2, 2021 · 1 comment

Comments

@The-Voidwalker
Copy link

The release notes indicate there is no replacement, so I'm not certain what needs to be do fix. Though, a vague recommendation is made that "MediaHandler provides for customizable media rendering", which may or may not prove useful here.

@lkucharczyk
Copy link
Owner

I would need another way to grab image data from gallery strip markers then.

public static function getGalleryData( $marker ) {
$gallery = PortableInfoboxDataBag::getInstance()->getGallery( $marker );
return isset( $gallery ) ? array_map( function ( $image ) {
return [
'label' => $image[1],
'title' => $image[0]
];
}, $gallery->getimages() ) : [];
}

I guess I could scrape parsed HTML, just like in tabber (same file; method below), but I would prefer a more elegant approach, so I leave that as a last resort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants