Extension:ExpandCss

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.

Modified Version
This is yet another minor modified

Change to Version 1.0.0
 * Release of the first version

Changing configuration
Add the following line to LocalSettings.php: include('extensions/ExpandCss.php');

Source Code
Copy the following code in to extensions/ExpandCss.php

<?php
 * 1) ExtendCSS Mediawiki extension
 * 2) Copyright (C) 2006 Thomas Klein
 * 3) http://www.mediawiki.org/
 * 4) This program is free software; you can redistribute it and/or modify
 * 5) it under the terms of the GNU General Public License as published by
 * 6) the Free Software Foundation; either version 2 of the License, or
 * 7) (at your option) any later version.
 * 8) This program is distributed in the hope that it will be useful,
 * 9) but WITHOUT ANY WARRANTY; without even the implied warranty of
 * 10) MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * 11) GNU General Public License for more details.
 * 12) You should have received a copy of the GNU General Public License along
 * 13) with this program; if not, write to the Free Software Foundation, Inc.,
 * 14) 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 * 15) http://www.gnu.org/copyleft/gpl.html
 * 1) You should have received a copy of the GNU General Public License along
 * 2) with this program; if not, write to the Free Software Foundation, Inc.,
 * 3) 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 * 4) http://www.gnu.org/copyleft/gpl.html
 * 1) http://www.gnu.org/copyleft/gpl.html

/**
 * ChangeLog
 * 10.04.2006 1.0.0
 * - Release of the first version
 * - 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://meta.wikimedia.org/wiki/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; }

?>