Page MenuHomePhabricator

InterWiki-Icons: show an optional small icon (favicon) on interwiki links
Closed, DeclinedPublic

Description

I propose to show optionally a small icon (such as the Wikipedia "W" letter for
Interlanguage-links to other wikipedias, or the Google "G" in a box for
Interwiki-links to google etc.) just before the target string of an interwiki
link, which has the form [[interwikiprefix:target]]

In this case of an interwiki where a small icon (in general, the favicon of the
site corresponding to interwikiprefix) is present on the wiki server, and the
sysop and the user option enables this new feature, then - instead of the linked
text string "interwikiprefix:target" only "(icon)target" is shown.

This visualises interwiki icons on a page by showing the well known icon(s) for
such sites. Copyrights of the small icons must be cleared of course. Other more
general icons, such as simple small red arrows "→" could be used
alternatively for a graphical representation and indication of interwiki links.

I prepared a description with images and screenshot of a mock-up on
http://meta.wikimedia.org/wiki/InterWikiIcons .

As not everyone will like that, I have provisionally proposed a user option to
opt-out the graphical icons for interwiki. Then the user will have the same UI
as it is now.

I hope, you'll like it.


Version: 1.22.0
Severity: enhancement
URL: http://meta.wikimedia.org/wiki/InterWikiIcons

Details

Reference
bz1254

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 8:08 PM
bzimport set Reference to bz1254.

zigger wrote:

For v1.3 and v1.4, link icons can already be set (for monobook & recent browsers
such as Firefox) by users' monobook.css customisations, based on
skins/monobook/main.css. e.g.

#bodyContent a[href ^="http://meta.wikipedia.org"] {

background: url("http://meta.wikipedia.org/favicon.ico") center right no-repeat;
padding-right: 16px;

}

(In reply to comment #1)

For v1.3 and v1.4, link icons can already be set (for monobook & recent browsers
such as Firefox) by users' monobook.css customisations, based on
skins/monobook/main.css. e.g.

#bodyContent a[href ^="http://meta.wikipedia.org"] {

background: url("http://meta.wikipedia.org/favicon.ico") center right

no-repeat;

padding-right: 16px;

}

Dear Zigger,

I have tried a first test in version 1.3.7 but without success:

  • Netscape 7.1 (usually, this works with css) and
  • [[we:test]] wherein "we:" as interwikiprefix for

"http://www.wikipedia.org/wiki/$1"

  • User:Myself/monobook.css:

#bodyContent a[href ^="http://www.wikipedia.org"] {

background: url("http://www.wikipedia.org/favicon.ico") center right no-repeat;
padding-right: 16px;

}

So, perhaps your comment is one solution, but as indicated, only for special
cases. However, I will consider further tests - thanks you. It would be great,
if you let me know of any problem, you might detect in my ad-hoc test above.

(In reply to comment #1)

For v1.3 and v1.4, link icons can already be set (for monobook & recent browsers
such as Firefox) by users' monobook.css customisations, based on
skins/monobook/main.css. e.g.

#bodyContent a[href ^="http://meta.wikipedia.org"] {

background: url("http://meta.wikipedia.org/favicon.ico") center right no-repeat; 
padding-right: 16px;

}

Two questions to Zigger:

  1. In stylesheets/monobook.css it works (thanks for the idea), but why doesn't it work when I put the code into a page User:NN/

monobook.css ?

  1. If I want to have the icon before the link, I got also a trailing white space (why?). I use the following modified code:

#bodyContent a[href ^="http://meta.wikipedia.org"] {

background: url("http://meta.wikipedia.org/favicon.ico") center left no-repeat; 
padding-left: 16px;

}

zigger wrote:

It may be a cascade issue -- see the CSS specs:
http://www.w3.org/TR/CSS1#the-cascade
http://www.w3.org/TR/CSS21/cascade.html#cascade
But I have no idea how well all the main browsers implement this.

The CSS solution given in comment 1 is sufficient for wikis that wish to add this functionality locally.

This will not be implemented in core. I say that as if I have some kind of authority - I don't, but nonetheless this will not be implemented in core. Trust me.

There is an extension which can create links which display actual favicons.
http://www.mediawiki.org/wiki/Extension:FaviconLink

Potentially we could fix up that extension to support the actual functionality that this bug report is asking for.
If anyone still wants the functionality, feel free to poke me, and I could probably create an extension or two for adding favicons before external links, interwiki links, etc...

At the bottom of http://zh.wikipedia.org/wiki/%E8%88%B9%E8%A5%AA
the user sees a blue link, "We Love Colors".

A blue link. What could possibly go wrong?

It's not external either (no external icon). Let's click it!

Diffusion changed the task status from Declined to Resolved by committing Unknown Object (Diffusion Commit).Mar 4 2015, 8:21 AM
Diffusion added a commit: Unknown Object (Diffusion Commit).
Aklapper changed the task status from Resolved to Declined.Mar 4 2015, 5:44 PM
Aklapper subscribed.