Page MenuHomePhabricator

Store urls from $wgAllowExternalImages in some link tracking table
Open, MediumPublicFeature

Description

I use $wgAllowExternalImages = true; http://www.mediawiki.org/wiki/Manual:$wgAllowExternalImages

There is no way to maintain the embedded external images (list all / find dead ones).

The URLs should be stored in the externallinks table at least.

If you think externallinks should be for real link URLs only, add a new special page to list all externally embedded images (when $wgAllowExternalImages = true).

But I think the table is perfect for it. It stores external URLs.

MW 1.18.0 here but this should apply to all versions.

May also apply to:
$wgAllowImageTag
$wgAllowExternalImagesFrom
$wgEnableImageWhitelist


Version: unspecified
Severity: enhancement

Details

Reference
bz38468

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:47 AM
bzimport set Reference to bz38468.
bzimport added a subscriber: Unknown Object (MLST).

Solution: Linker::makeExternalImage() becomes a linked image.

Problem: I don't know how to add/update that entry in the 'externallinks' table

Bryan.TongMinh wrote:

(In reply to comment #1)

Solution: Linker::makeExternalImage() becomes a linked image.

Problem: I don't know how to add/update that entry in the 'externallinks' table

This is typically done in the Parser rather than in the linker, by adding the links to the local ParserOutput object.

Thanks. I just copied

  1. Register it in the output object...
  2. Replace unnecessary URL escape codes with their equivalent characters
				$pasteurized = self::replaceUnusualEscapes( $url );
				$this->mOutput->addExternalLink( $pasteurized );

from makeFreeExternalLink() and added it below

				$text = Linker::makeExternalImage( $url );

in maybeMakeExternalImage()

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM