Last modified: 2014-10-26 17:19:44 UTC
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).
this issue also cause iamgemap links not to respect $wgExternalLinkTarget (i.e., links from imagemap do not open with target = "_blank") peace.
Hi kipod! Sorry that nobody has taken a look at this report yet and given feedback. Thanks for your patch! You are welcome to use Developer access https://www.mediawiki.org/wiki/Developer_access to submit this as a Git branch directly into Gerrit: https://www.mediawiki.org/wiki/Git/Tutorial Putting your branch in Git makes it easier for us to review it quickly. Thanks again! We appreciate your contribution.
Thanks. i may bite the bullet and do it eventually, but in the meantime, please note that the developer access is not really usable (at least it was not the last time i looked) to someone who uses windoze. peace.
When was the last time you looked? There has been progress in the past weeks. And where was the problem? In Gerri? Labs? Check http://www.mediawiki.org/wiki/Git/Workflow#Windows Your feedback is welcome if you run into any problems. Thank you!
Is this bug a good candidate for Google Code-in? Someone to take this patch and doing the necessary changes to submit a Gerrit changeset? https://www.mediawiki.org/wiki/Google_Code-In
kipod: Could you upload the patch as a patch file?
will do shortly (shortly=in a couple of days. my environment is not up and running ATM). peace.
kipod: Could you upload the patch as a patch file? Also see http://tools.wmflabs.org/gerrit-patch-uploader/
kipod: Could you upload the patch as a file? See http://tools.wmflabs.org/gerrit-patch-uploader/ - no need to set up anything like git-review, diff is enough.