Topic on Project:Support desk

Are there any standards for skins?

3
Txantimedia (talkcontribs)

I spent some time figuring out how to add a Comodo SSL icon to the footer. After I got it working, I checked it in all the skins. In Cologne Blue there are no icons at all. The Powered By and Copyright icons aren't even there. In Modern, the icons didn't appear. Just the Alt text was there, linked to the relevant sites. In Monobook, the Copyright icon was on the far left, the Comodo in the middle and the Powered by on the far right. In Vector, the order was reversed from what it is in my preferred skin, Timeless.

Are there no rules for skins at all? It seems there ought to be a requirement for some defaults that would appear in all skins. Either that's not the case, or it's not being honored. Shouldn't MediaWiki at least require that the bundled skins behave as expected?

Seb35 (talkcontribs)

You didn’t say the technique you used to make it work. Generally speaking there is no guarantee that all skins support all skinning features; Vector is the reference skin, MonoBook has still some support, Minerva is the default skin on mobile, and Timeless is currently experimental, others are probably less supported.

To customise the footer icons, you can use $wgFooterIcons, or the hooks SkinGetPoweredBy and SkinCopyrightFooter, but again there is no guarantee they will be displayed on all skins.

Txantimedia (talkcontribs)

I used this:

$wgFooterIcons = [
        "copyright" => [
                "copyright" => [], // placeholder for the built in copyright icon
        ],
        "poweredby" => [
                "mediawiki" => [
                        // Defaults to point at
                        // "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png"
                        // plus srcset for 1.5x, 2x resolution variants.
                        "src" => null,
                        "url" => "//www.mediawiki.org/",
                        "alt" => "Powered by MediaWiki",
                ]
        ],
        "comodo" => [
                "comodo" => [
                        "src" => "/images/trusted-site-seal-sm.png",
                        "url" => "https://www.comodo.com",
                        "alt" => "SSL by Comodo",
                        "width" => "94",
                        "height" => "49",
                ]
        ],
];
Reply to "Are there any standards for skins?"