Difference between revisions of "How-Tos"
Line 11: | Line 11: | ||
You can either use [http://www.mediawiki.org/wiki/Manual:Footer#Add_links_to_the_footer Mediawiki's default mechanisms] or you can add your own link or any [[Navigation|navigational section or element]] by placing it in [[Mediawiki:Tweeki-footer]]. | You can either use [http://www.mediawiki.org/wiki/Manual:Footer#Add_links_to_the_footer Mediawiki's default mechanisms] or you can add your own link or any [[Navigation|navigational section or element]] by placing it in [[Mediawiki:Tweeki-footer]]. | ||
+ | |||
+ | == Styling == | ||
+ | |||
+ | === Add custom CSS === | ||
+ | |||
+ | One possibility is to create your own extension. Place a CSS file in your extension directory. Then in your extension setup file create a ''Resource Module'' and add it to <code>$wgTweekiSkinCustom</code>: | ||
+ | |||
+ | $wgResourceModules['x.MYEXTENSION.styles'] = array( | ||
+ | 'styles' => array( | ||
+ | 'screen.css' => array( 'media' => 'screen' ) | ||
+ | ), | ||
+ | 'localBasePath' => __DIR__, | ||
+ | 'remoteExtPath' => 'MYEXTENSION', | ||
+ | ); | ||
+ | |||
+ | $wgTweekiSkinCustomCSS[] = 'x.MYEXTENSION.styles'; | ||
+ | |||
+ | Attention! Your CSS file will be included via Ressource Loader. As the mechanism seems to sort the files in alphabetical order and you want your stylings to be loaded last (in order to overwrite default stylings) chose a name for your ''Resource Module'' accordingly (e.g. start with an 'x' as in the example). |
Revision as of 14:05, 25 February 2015
Just add the navigational sections and elements you want to hide for anonymous users to the $wgTweekiSkinHideAnon
array in LocalSettings.php, e.g.
$wgTweekiSkinHideAnon = array( 'navbar' );
You can either use Mediawiki's default mechanisms or you can add your own link or any navigational section or element by placing it in Mediawiki:Tweeki-footer.
Styling
Add custom CSS
One possibility is to create your own extension. Place a CSS file in your extension directory. Then in your extension setup file create a Resource Module and add it to $wgTweekiSkinCustom
:
$wgResourceModules['x.MYEXTENSION.styles'] = array( 'styles' => array( 'screen.css' => array( 'media' => 'screen' ) ), 'localBasePath' => __DIR__, 'remoteExtPath' => 'MYEXTENSION', );
$wgTweekiSkinCustomCSS[] = 'x.MYEXTENSION.styles';
Attention! Your CSS file will be included via Ressource Loader. As the mechanism seems to sort the files in alphabetical order and you want your stylings to be loaded last (in order to overwrite default stylings) chose a name for your Resource Module accordingly (e.g. start with an 'x' as in the example).