Extension:WEtheme
From WikiEducator
LicenseByCategory Release status: experimental | |
---|---|
Implementation | Tag |
Description | Allows adding custom CSS and/or Javascript to a wiki page. |
Author(s) | JimTittslerTalk |
Last Version | 0.4.0 (2014-04-08) |
MediaWiki | 1.15.5+ |
License | MIT |
Download | git [1] ReadMe |
What does this extension do?
The WEtheme extension allows OER Foundation partners to apply themes to selected pages in the wiki.
Usage
<wetheme p="partner_name" css="course.css" js="course.js" viewport="" ie="IE lte 9" header="header.html" />
(All parameters are optional except p.)
- p
- name of the partner institution
- css
- CSS filename within the partner directory (optional)
- js
- Javascript filename within the partner directory (optional)
- viewport
- viewport header
- ie
- wraps CSS and Javascript in an Internet Explorer conditional block
- header
- allows inserting an HTML fragment from the partner directory of the local filesystem directly in the page HEAD
Installation
1. Install the extension from git.
cd extensions git clone https://bitbucket.org/wikieducator/wetheme.git WEtheme cd WEtheme git checkout master
2. Add to your LocalSettings.php
:
require_once( "$IP/extensions/WEtheme/WEtheme.php" ); # map from partner name to CSS/Javascript directory # can be local to the filesystem or remote (such as S3) $wgWEthemePartners = array( 'WikiEducator' => 'http://s.wikieducator.org/WikiEducator/', 'OERf' => '/extensions/WEtheme/t/OERf/', );