Help?

Help:TextBook Skin

From Textpattern CMS User Documentation

All relevant notes about the supported TextBook skin are recorded here.

Contents

TextBook Skin Configuration

This describes the first phase of creating any custom skin for MediaWiki. This is not the presentation layer, only the needed configurations to put the new skin in place. Despite the tense of the instructions, all of this is done in TextBook.

Step 1: Clone the default wiki skin (monobook)

Begin by creating a copy of MediaWiki's default skin folder and file in ../skins/ and rename them with the following convention (case-sensitivity is very important here):

  • change MonoBook to TextBook (the camel-case convention is necessary)
  • change monobook to textbook (the lowwer-case convention is necessary)

Step 2: Edit all references to "monobook" and "MonoBook"

You need to edit all references to monobook/MonoBook to the textbook/TextBook equivalent.

In the following files...

  • ../skins/TextBook.php
  • ../includes/SkinTemplate.php
  • ../LocalSettings.php

...do a find/replace to replace reference to the two types of skin name conventions noted above(make sure the find function is cap-sensitive).

You can also do it manually, in which case MediaWiki's Meta Skins page should be a good reference.

That's it. Restricting skin options comes next.

Restrict Skin Options

Because the textbook skin has a customized index file and presentation layer, and further that this is the only skin supported, the other skin options should be suppressed from user options or they might choose something else only to see a disaster (and really, those default MW skins look like shite anyway).

Use the following configs in the TextBookSettings.inc file

## Set textbook skin as default
$wgDefaultSkin = 'textbook';

## Remove named skins from user preferences. 
## Forces use of default skin above.
$wgSkipSkins = array("monobook", "chick", "cologneblue", "myskin", "nostalgia", "simple", "standard");

At the same time, there's no need to keep the useless skin folders on the server tree anymore. After every MW upgrade, all the installed skin folders and their associated index files can be safely deleted.

Do not remove the common directory (...skins/common), however, as this provides various Javascript functions used in every skin, including the custom TextBook skin.

Custom Skin Presentation

This is where the sh!t and the shaf separate. If you know your way with XHTML and CSS, you can fundamentally rebuild the new skin from scratch, and it's recommended too or the new skin risks looking like zillions of other boring ol' monobook clones on the web. The key is to use existing id and class selectors but otherwise redesign your XHTML layout and completely strip-down the CSS to bare essentials. Believe it, anything is possible in knowledgeable hands.

Browser Support

Without getting into needless explanations (or defense) why, here are the browsers TextBook cares to bother with:

  • Modern versions of Firefox, Opera, Chrome, Safari (Mac only) and IE.
  • IE 6 (for the time being)

How to Edit the Skin, and Who?

Because of the customized nature of the TextBook skin, it's not possible to effectively edit the CSS from any wiki page. The skin is (or will be soon if not already) defined by several CSS files that cascade together. Thus only TextBook admins can edit the presentation layer of TextBook, via the back-end.

There are various help docs brewing under the Presentation section of the help:Contents that aim to provide wiki users with a set of CSS rules to easily make their content consistent and beautiful. If you have suggestions for additional styling, let the admins know in the TextBook forum.

Translations [?]