Difference between revisions of "How-Tos"

From Tweeki
Jump to: navigation, search
Line 1: Line 1:
 
__TOC__
 
__TOC__
 +
 +
== Complete sample configuration ==
 +
 +
Have a look at the [[Setup for tweeki.thai-land.at]]
 +
 
== Navigation ==
 
== Navigation ==
  

Revision as of 22:18, 30 June 2016

Complete sample configuration

Have a look at the Setup for tweeki.thai-land.at

Navigation

Show navigation or parts of it only for logged in users

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' );

Add links to the footer

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.

Define your own tooltips and accesskeys for navigational elements

You just have to find out the id of the element and then edit MediaWiki:Tooltip-MY-ID and MediaWiki:Accesskey-MY-ID. If would like to have a tooltip and/or an accesskey for the toolbox dropdown you would just have to change the content of MediaWiki:Tooltip-p-toolbox and MediaWiki:Accesskey-p-toolbox.

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).