Last modified: 2014-10-26 17:19:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T38175, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36175 - The links on imagemap should contain information about "missing article" and "external link".
The links on imagemap should contain information about "missing article" and ...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
ImageMap (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-23 14:13 UTC by kipod
Modified: 2014-10-26 17:19 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description kipod 2012-04-23 14:13:02 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).
Comment 1 kipod 2012-11-12 22:50:59 UTC
this issue also cause iamgemap links not to respect $wgExternalLinkTarget (i.e., links from imagemap do not open with target = "_blank")

peace.
Comment 2 Andre Klapper 2013-01-23 13:15:11 UTC
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.
Comment 3 kipod 2013-01-23 19:17:58 UTC
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.
Comment 4 Quim Gil 2013-01-24 15:30:44 UTC
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!
Comment 5 Quim Gil 2013-11-19 15:32:41 UTC
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
Comment 6 Andre Klapper 2014-02-04 11:00:57 UTC
kipod: Could you upload the patch as a patch file?
Comment 7 kipod 2014-02-05 21:21:21 UTC
will do shortly (shortly=in a couple of days. my environment is not up and running ATM).

peace.
Comment 8 Andre Klapper 2014-03-20 13:50:35 UTC
kipod: Could you upload the patch as a patch file? Also see http://tools.wmflabs.org/gerrit-patch-uploader/
Comment 9 Andre Klapper 2014-07-18 12:50:53 UTC
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.
Comment 10 Andre Klapper 2014-10-26 17:19:44 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links