Extension:ExpandCss
From MediaWiki.org
|
ExpandCss Release status: stable |
|
|---|---|
| Implementation | Skin |
| Description | Expand the CSS Styles for your wiki without own skin |
| Author(s) | User:Ennox |
| Version | 1.0.0 (2006-04-10) |
| MediaWiki | 1.6.x+ |
| Download | look down |
| Hooks used | |
Contents |
[edit] Expand CSS
With this extension you can expand the css of mediawiki with your own css styles. After the installation, you have a new element in Special:Allmessages with name expand_css. In this article you must use your own CSS styles.
Attention: This extension works only with MediaWiki 1.6 or higher.
[edit] Modified Version
This is yet another minor modified
Change to Version 1.0.0
- Release of the first version
[edit] Installation
[edit] Changing configuration
Add the following line to LocalSettings.php:
include('extensions/ExpandCss.php');
[edit] Source Code
Copy the following code in to extensions/ExpandCss.php
<?php # # ExtendCSS MediaWiki extension # # Copyright (C) 2006 Thomas Klein # http://www.mediawiki.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # http://www.gnu.org/copyleft/gpl.html /** * ChangeLog * * 10.04.2006 1.0.0 * - Release of the first version */ if( !defined( 'MEDIAWIKI' ) ) { die(); } $wgExtensionFunctions[] = "wfExpandCssInstall"; $wgHooks['SkinTemplateSetupPageCss'][] = 'wfExpandCss'; $wgExtensionCredits['parserhook'][] = array( 'name' => 'Expand CSS', 'version' => '1.0.0', 'url' => 'http://www.mediawiki.org/wiki/Extension:ExpandCss', 'author' => 'Thomas Klein', 'description' => 'Expand the CSS Styles for your wiki without own skin' ); function wfExpandCssInstall() { global $wgMessageCache; global $wgVersion; if ( version_compare( $wgVersion, '1.6', '<' ) ) { wfDebugDieBacktrace( "MediaWiki 1.6 required--this is only $wgVersion" ); } $wgMessageCache->addMessage('expand_css' ,'/* write your own expand css styles here */'); } function wfExpandCss(&$css) { $css = "/*<![CDATA[*/\n" . wfMsg( 'expand_css' ) . "\n/*]]>*/"; return true; }

