Page MenuHomePhabricator

Wikilinks have no icon when linking to e.g. PDF files, unlike external links
Open, Needs TriagePublic


Hi. When we have a weblink in wikicode, for example
the mime type is recognized well, and we see the accordand icon, pdf in this case. But wikilinks fail to do this, as in
I made yesterday a very big work for converting weblinks to wikilinks, and I needed to add dozens of {{PDF}} templates, in two cases:
[] -> [[media:filename.pdf]]{PDF}}
[] -> [[c:File:filename.pdf]]{{PDF}}
Could you fix this problem, please? Thank you.

Event Timeline

IKhitron created this task.Sep 2 2017, 2:51 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 2 2017, 2:51 PM
Legoktm added a subscriber: Legoktm.Sep 3 2017, 4:27 AM

So to clarify, you want wikilinks to the file namespace to include the external link icons that are associated with that file extension?

(Mediawiki is not only for Wikipedia but) In Wikipedia usually internal links are within the article body, while external links are in External Links section. With this in mind, having icons within body paragraphs may be noisey and not friendly for readers. So we should probably ask for comments from readersor UI/design experts or WP:VP.

Technically, MW stylesheet intentionally enable it only for external links, but this could be easily done in css so specific users can enable it on their own userpage. More or less like this one:

a[href$=".pdf"] {
    /* @embed */
    background: url("PDFICON") no-repeat left;
    padding-left: 18px;

Yes, @Legoktm.
Well, @eranroz, I see your point, but external link to pdf file in article body, and not in reference, is a wiki style mistake, isn't it?

matmarex renamed this task from Wikilink ignores mime information to Wikilinks have no icon when linking to e.g. PDF files, unlike external links.Sep 6 2017, 1:18 AM
matmarex edited projects, added MediaWiki-Interface; removed MediaWiki-General.