Configuration Options

From Tweeki
Revision as of 13:46, 10 February 2015 by Thai (talk | contribs) (Created page with "== Configuration Options (and their defaults) == These options can be set in '''LocalSettings.php''' (after the inclusion of tweeki.php): $wgTweekiSkinUseAwesome = true; :W...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Configuration Options (and their defaults)

These options can be set in LocalSettings.php (after the inclusion of tweeki.php):

$wgTweekiSkinUseAwesome = true;
Whether or not to include Font Awesome to allow the use of icons like this one: (<span class="fa fa-bus"></span>)

Special Navigational Elements

$wgTweekiSkinNavigationalElements = array();
Add to this array to create customized buttons, the array's key is the keyword for the navigational element to be used in navbars, subnav, sidebar, or footer, the value is the name of a callback function. This function will be called with the skin object as argument and should return either an array of buttons or a string that can be parsed as buttons.
$wgTweekiSkinSpecialElements = array( 
  'FIRSTHEADING' => 'self::renderFirstHeading', 
  'TOC' => 'self::renderTOC', 
  'SEARCH' => 'self::renderSearch', 
  'LOGO' => 'self::renderLogo', 
  'LOGIN-EXT' => 'self::renderLoginExt' 
  );
Use this array to add completely arbitrary code into navbars, subnav, sidebar, or footer. The value again is a callback function you need to create. It will be called with two arguments, the skin object and the context as a string (navbar-left, navbar-right, subnav, sidebar, footer). The function should directly print the html you want to have.

Hiding Page Elements

$wgTweekiSkinHideAll = array();
This variable can be used to hide elements from everybody. The {{#tweekihide}} parser function will add to this array. Attention: Only hiding of elements that are also listed in $wgTweekiSkinHideable will actually be put into effect.
$wgTweekiSkinHideable = array( 'firstHeading' );
In order to prevent abuse, only elements listed in this array are allowed to be hidden by the {{#tweekihide}} parser function.
$wgTweekiSkinHideAnon = array();
Elements in this array will be hidden for users who are not logged in.
$wgTweekiSkinHideNonPoweruser = array( 'TOOLBOX', 'EDIT-EXT-special' );
Elements in this array will only be shown to users who have chosen in their preferences to be "powerusers".

Footer

$wgTweekiSkinFooterIcons = true;
If set to false, the icons in the footer will be replaced by text aquivalents.