Extension:SkinByUrl2
|
Skin-by-URL 2 Release status: beta |
|||
|---|---|---|---|
| Implementation | Skin | ||
| Description | Force use of a particular skin based on the URL used to access the wiki | ||
| Last version | 0.1 | ||
| MediaWiki | 1.15 | ||
| License | AGPLv3 | ||
| Download | Project page Git [Help] |
||
| Example | http://wiki.wontology.org/wiki/help.php?title=WmHelp:AboutWontologyOrg | ||
|
|||
|
Check usage (experimental) |
|||
Contents |
[edit] What can this extension do?
Skin-by-URL 2 will cause the skin used to display a page to be determined by the PHP script name in the wiki URL. For example, MediaWiki URLs normally use the script name "index.php" before the page-title portion of the URL. This extension examines request URLs for a script name other than "index", and if present, sets the output skin to one whose name matches the requested script name (if available).
[edit] Usage
Change links into your wiki which you want to control the display skin from their "normal" format of
http://your.wiki.tld/wiki/index.php/Your_Article
or
http://your.wiki.tld/wiki/index.php?title=Your_Article
to look like:
http://your.wiki.tld/wiki/a_skin.php?title=Your_Article
The extension will also support "extra pretty" URL schemes like
http://wiki.yoursite.tld/wiki/Your_Article http://wiki.yoursite.tld/Your_Article
as long as you use the completely explicit URL format ("a_skin", above) when creating links that include a skin-selecting script name.
[edit] Download instructions
The public repository for Skin-by-URL 2 is on GitHub at http://github.com/gleneivey/skin-by-url-2
[edit] Installation
Place the skin-by-url-2 files in a directory of the same name under "extensions" in your MediaWiki installation, and add the following to your LocalSettings.php:
$wgParserCacheType = CACHE_NONE; $wgUsePathInfo = false; require_once( "$IP/extensions/skin-by-url-2/skin-by-url-2.php" );
In order for this extension to work, in addition to installing the extension, administrators must create links (tested) or URL aliases (will probably also work) from their desired skin-specific script names to the default one (e.g., from "simple.php" to "index.php"). Yes, this is a little kludgey and adds an extra step to restoring a completely destroyed wiki installation, but it is easy to understand and manage. Note that the names of the links used in place of "index.php" must still end in ".php" to be recognized (or in whatever value you've set for $wgScriptExtension).
See the README file for more detailed installation instructions and additional options.
[edit] See also
Though it shares no code, Skin-by-URL 2 is a functional clone of Extension:SkinByURL.
