Monobook

Mobile < Skins > Mouse   (talk | users | test page | RWD? | set as default | unset | validate: HTML, CSS)

Summary: Makes PmWiki look like MediaWiki/Wikipedia
Version: 2009-02-23
Status: Stable
Prerequisites: pmwiki-2.1
Maintainer: Dfaure
Categories: Skins, WikipediaSuite, PHP72
Download: monobook.zipΔ
Discussion: Monobook-Talk
Users: +1 (View / Edit)

About

This skin is massively inspired from MediaWiki default skin (also originally named monobook).

MediaWiki is the software used for old Wikipedia and the other old versions of Wikimedia Foundation websites (except for Wikidata).

Installation

To use the Monobook skin for your own Wiki, just download monobook.zipΔ, extract it into /path/to/pmwiki/pub/skins/ and add the following code to your local configuration file:

 # Specifies the name of the template file
 # to be used to generate pages.
 $Skin = 'monobook';

For PHP versions 5.5 and 7.2 or newer, please get monobook72.phpΔ, rename it to monobook.php and replace the one in pub/skins/monobook.

Features

The skin current features are:

  • Full CSS driven (no tables),
  • Wiki actions as notebook tabs,
  • Zoom support (fixed size fonts used only for Wiki actions),
  • Smooth handling of (:noheader:), (:nofooter:) and (:notitle:) directives,
  • Extra directives (:noleft:) and (:notabs:) available to hide unwanted sections
  • An extra SideBar bottom block using {$Group}.SideNote? or Site.SideNote? pages,
  • Developed and tested under IE6/7 and Firefox. Reported to work with other browsers like Epiphany, Konqueror and Opera (7.54).
Note
The original layout is supposed to handle a 135x135 pixels logo. This explains why the PmWiki logo looks a bit alone in its corner.

Technical hints (advanced user/admin.)

Notebook tabs customization

The skin uses the list of action links stored into {$Group}.PageActions? or Site.PageActions pages to generate the notebook tabs (as PmWiki default skin does to display available actions).

The skin layout prevent using PageActions pages for defining something else than an action list.

In order to restore the previous skin specific behavior, each action link definition may be followed by a secondary (hidden) link for the rendering of the currently selected tab (aka. for the current action).

Skin previous default behavior would be restored with following sample PageActions customization:

* [[$[View] -> {$FullName}]] %comment%[[{$Group}|{$Groupspaced}/&hellip;]]%%
* [[$[Edit Page] -> {$FullName}?action=edit]]
* [[$[Page Attributes] -> {$FullName}?action=attr]]
* [[$[Page History] -> {$FullName}?action=diff]]
* [[$[Upload] -> {$FullName}?action=upload]]

where the first tab is rendered as a link to either:

'Skins/…'
current page group when browsing a page,
'View'
browse current page when performing another action on it.

Link decoration

The skin specific link decoration may be dropped with the following code into your local configuration file:

 $EnableSkinLinkDecoration = 0;

Sometimes, the decoration applied to external links (whose not generated from group/pages) leads to bad looking rendered output (especially when using images as links). The following image link:

 [[http://www.pmwiki.org|http://www.pmichaud.com/img/misc/gem.jpg]]

is (poorly) rendered as:

The solution is to explicitly qualify the link with the %wikilink% style as if it was "internally" generated. The tweaked image link:

 %wikilink% [[http://www.pmwiki.org|http://www.pmichaud.com/img/misc/gem.jpg]]

is (better) rendered as:

Nota (PmWiki version < 2.1 beta 10): when applying this trick to already class-defined elements (such as %lframe% enclosed images), you need to write explicitely the style definition using atomic class elements (as %class='lfloat frame wikilink'% in this case):

 %class='frame wikilink'% [[http://www.pmwiki.org|http://www.pmichaud.com/img/misc/gem.jpg]]

renders as:

Header/Footer customization

Like Grease skin does, several "fixed" parts of the skin (title, wikititle and footer) may be customized from the configuration files via the $SkinPartFmt array variable with regular markup definitions. The skin defaults are:

$SkinPartFmt['wikititle'] = "$WikiTitle - {\$Titlespaced}";
$SkinPartFmt['title'] = '{$Titlespaced}';
$SkinPartFmt['footer'] = ...;

As an interesting side effect, the (:title ...:) directive will therefore handle regular markup (emphasis, links, ...).

Contributor

Dfaure

See also

  • Category: WikipediaSuite - more recipes trying to implement useful Wikipedia-like features in PmWiki.

History

2016-01-14
Fixed PHP-5.5 compatibility (github)
2009-02-23
Applied some look changes on sidebar. Various internal fixes.
2007-01-25
Fixed $EnableStopWatch handling.
2006-12-05
Another fix for Site.PageActions handling.
2006-11-26
Fixed erroneous Site.PageActions handling.
2006-11-17
Added RecipeInfo data. Added footer customization feature.
2006-09-05
Re-enabled RightBar minimalistic support. Code cleanup and synched with latest PmWiki version.
2006-04-28
Oops, fixed the last fixes ;-)
2006-04-23
Fixed several skin issues (noticeably local styles processing).
2006-03-01
Fixed skin link decoration customization.
2006-02-03
Added SideNote handling. Corrected Attachment decoration behavior.
2005-10-06
Added header customization feature.
2005-09-07
Added handling of Site.PageActions (introduced with PmWiki v2.0 default skin).
2005-09-05
Fixed several visual bugs including latest SideBar styling.
2005-08-05
Revamped attachment links. Dropped deprecated WikiHelp link in page footer. Fixed underlined titles style.
2005-06-17
Fixed forgotten AllRecentChanges link.
2005-06-16
Corrected RightBar placement and added handling of Site group and related directives.
2005-06-10
Added support of RightBar sub pages compatible with 's Gemini and FixFlow.
2005-06-09
Applied suggested changes and relooked print action.
2005-06-03
Handling of forgotten ?action=print and minor tweaks.
2005-06-01
Initial release.

Comments

See Discussion at Monobook-Talk

User notes +1: If you use, used or reviewed "Monobook", you can add your name. These statistics appear in the Skins listings and will help newcomers browsing through the wiki.