Home/Mediawiki_access/SkinSelection        page discussion        wiki discussion edit history     [Images:TURN OFF] [Connection:go offline]


Contents

[edit] 1 Can anonymous users choose a mediawiki skin?

The translatewiki allows anonymous users to set their language via the Extension:LanguageSelector.

Is it possible to do the same for mediawiki skins?

The idea behind this question is to offer a low bandwidth skin (for use in developing countries, as well as over mobile), that should be user selectable (without logging in). This has two parts:

There doesn't seem to be an extension or skin available, so let's experiment a little.

[edit] 2 What's available?

[edit] 2.1 Ad-hoc skin selection

http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php

http://www.ict4e.net/wiki_source/index.php?title=Main_Page&useskin=cologneblue

[edit] 2.2 Extensions to select skins per page, namespace, or browser

There are some extensions that allow page or namespace specific selection of skins:

(Note that there is some interaction between these extensions if they are all installed. You need to double check that you get the desired results. For instance, the MobileSkin overrides SkinPerPage. If the MobileSkin.php is included, SkinPerNamespace no longer works on desktop browsers, but it does still work for mobile browsers. It would be a useful project to make those compatible with each other in a sensible way.)

[edit] 2.3 Links to other skin related projects

The following two projects refer to skin selection, but there doesn't seem to be code downloadable:

http://www.mediawiki.org/wiki/Category:Skin_extensions

[edit] 2.4 Mediawiki 1.14.0: $wgHandheldStyle

Also note the $wgHandheldStyle variable http://www.mediawiki.org/wiki/Manual:$wgHandheldStyle, introduce in 1.1.4.0. This can be set to a string (the skin) or to false. It provides a style for media="handheld".

Optionally, we can specify a stylesheet to use for media="handheld". This is recognized by some, but not all, handheld/mobile/PDA browsers. If left empty, compliant handheld browsers won't pick up the skin stylesheet, which is specified for 'screen' media.

Can be a complete URL, base-relative path, or $wgStylePath-relative path. Try 'chick/main.css' to apply the Chick styles to the MonoBook HTML.

Will also be switched in when 'handheld=yes' is added to the URL, like the 'printable=yes' mode for print media.

Example: The current page with handheld=yes.

This is quite useful, as it allows the user to momentarily change the skin, by adding 'handheld=yes'. However, the setting isn't remembered, so only the current page is show in handheld style.

Also, we need to use this with a lightweight skin.

[edit] 3 Thoughts on Skin Selection

It should be possible to tweak the skin through parameters, perhaps even without modification of mediawiki core.

[edit] 3.1 Remembering the setting

To remember the setting, we can use a $_SESSION variable.

[edit] 3.2 Example

We can combine the nocss skin (Mediawiki access/Monobmo/nocss), with the original monobook skin, by adding a little bit of code to make the removal of javacsript/css optional, and also store the result in a cookie.

[edit] 4 Results: A mediawiki skin that detects browser and is switchable

Example here monomix:

Currently, the main skin of the wiki is monomix, and if you have skin=nocss selected, you can browse the whole wiki like that!


[edit] 5 To do

Also:

Home/Mediawiki_access/SkinSelection, rev=9406, user=Bjoern, time=2009-05-16T19:06:31Z
Page: Mediawiki_access/SkinSelection, server-cache-status=cached, images=, connection=, client-cache=no