3

Is there a way to force a particular skin to be applied while displaying specific MediaWiki articles?

In my wiki many articles will have a "flip" version with alternative content (think "good" and "evil" perspectives of the same topic). I was thinking about using namespaces to separate these versions, but I need a definitive way to visually contrast them.

  • There is a link in special preferences that allows you to preview skins. It can be hacked. – jehovahsays Feb 7 '18 at 18:25
1

Disable per-user skin settings with

$wgHiddenPrefs[] = 'skin';

then set $wgDefaultSkin dynamically.

1

There is a SkinPerPage extension that serves exactly this purpose: to force a particular skin on a given page.

In short:

(1) Download the extension, unpack files in /wiki-folder/extensions/

(2) Add wfLoadExtension( 'SkinPerPage' ); instruction to your LocalSettings.php

(3) Add <skin>skin-name</skin> tag to the page that you need to show a skin different from the default.

Sweet :)

Tested on the brand new MediaWiki 1.30.0 release.

0

I'm not certain but I believe that skin preference is the only way. If you know how cookies may be a good idea for page specific skins but it would require quite a bit of setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.