https://bugzilla.wikimedia.org/show_bug.cgi?id=36175
Web browser: ---
Bug #: 36175
Summary: The links on imagemap should contain information about
"missing article" and "external link".
Product: MediaWiki extensions
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: ImageMap
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Mobile Platform: ---
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).
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l