Last modified: 2011-08-14 18:26:39 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14549 - Add custom classes to interwiki links per project within a wiki family
Add custom classes to interwiki links per project within a wiki family
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: 22771
  Show dependency treegraph
Reported: 2008-06-15 18:01 UTC by italvet
Modified: 2011-08-14 18:26 UTC (History)
4 users (show)

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


Description italvet 2008-06-15 18:01:36 UTC
Hello. On fr.wikibooks we would like to differentiate the external links depending of the project they refeer to. Currently all the wikimedia internal links use the "exitw" class, so the only way to detect if they lead to wikipedia, wikisource... is to use a javascript for parse the href attribute.

it should be useful if wikipedia links have a "link-wikipedia" class, wikisource a "link-wikisource" class, etc.
Comment 1 Daniel Friesen 2008-06-15 18:41:22 UTC
Actually it can be done with CSS3, supported by a number of the latest browsers.


or whatever ^= or *= you need to match the href. It doesn't need JS, CSS will work fine. It's already used for all the special icons like the mailto e-mail icon.
Comment 2 italvet 2008-06-15 18:48:33 UTC
but could it be implemented in the software anyway ? *= don't looks enough reliable to me. for example if the link is [[s:all about]] the result could be quite unpredictable.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-06-15 18:54:36 UTC
a.exitw[href^=] or similar would work, except that the language code comes before the second-level domain name, so you'd have to list all languages individually.  Thanks for being backwards, DNS.  :(

Not sure this deserves yet another collection of classes.
Comment 4 italvet 2008-06-15 19:09:21 UTC
and it's not about hardwriting a "collection of classes" but more about generating classes dynamicly from the "sitematrix".
Comment 5 Platonides 2010-03-14 23:17:23 UTC
You can use a.exitw[href*=""] selector. That's not perfect, but since having a couple of classes per project ([[s:Foo]] and [[wikisource:Foo]]) isn't much better, I think you better stick with it.

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