One deficiency with imagemap is that there is no way for the user (or a script) to know if the page of this link actually exists. It would be very useful to have this available. IMO, this can be accomplished with zero regressions by adding
the patch looks somewhat like so: (ImageMap_body.php, near line 211)
if ( $externLink ) { $attribs['href'] = $title; $attribs['class'] = 'plainlinks'; if ( $wgNoFollowLinks ) { $attribs['rel'] = 'nofollow'; }
+ } elseif (! $title->exists()) {
+ $attribs['class'] = 'new';
} elseif ( $title->getFragment() != '' && $title->getPrefixedDBkey() == '' ) { # XXX: kluge to handle [[#Fragment]] links, should really fix getLocalURL() # in Title.php to return an empty string in this case $attribs['href'] = $title->getFragmentForURL();
or somesuch (totally untested, but very simple. not sure if "new" links actually need the next "elseif").
to see a script that would profit from this, please see
http://he.wikipedia.org/wiki/Mediawiki:Imagemap-Highlight.js
(This script extract the hotsopts from imagemap and create a "table of contents" below it, with the appropriate text and links. hovering above a toc item highlights the imagemap area or areas associated with it. the above patch would allow to distinguish "red links" for non-existing pages).
Version: unspecified
Severity: normal