Difference between revisions of "Configuration"

From Tweeki
Jump to: navigation, search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== 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 [http://fortawesome.github.io/Font-Awesome/ Font Awesome] to allow the use of icons like this one: <span class="fa fa-bus"></span> (<code><nowiki><span class="fa fa-bus"></span></nowiki></code>)
 
 
=== 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|<nowiki>{{#tweekihide}}</nowiki> parser function]] will add to this array. Attention: Only hiding of elements that are also listed in <nowiki>$wgTweekiSkinHideable</nowiki> 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|<nowiki>{{#tweekihide}}</nowiki> 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.
 
 
== Messages (and their defaults) ==
 
 
=== Navbar ===
 
 
[[Mediawiki:Tweeki-navbar-brand]]: {{SITENAME}}
 
:Content of the "brand" link.
 
 
[[Mediawiki:Tweeki-navbar-left]]: ''empty''
 
:Content of the left side of the navbar.
 
 
[[Mediawiki:Tweeki-navbar-right]]: SEARCH,TOOLBOX,PERSONAL
 
:Content of the right side of the navbar.
 
 
[[Mediawiki:Tweeki-navbar-class]]: navbar navbar-default navbar-fixed-top
 
:Classes to use for the navbar. For further possibilities see http://getbootstrap.com/components/#navbar
 
 
=== Subnavigation ===
 
 
[[Mediawiki:Tweeki-subnav]]: SIDEBAR
 
:Content of the sub navigation. Set to "-" to not show a sub navigation.
 
 
=== Sidebar ===
 
 
[[Mediawiki:Tweeki-sidebar]]: EDIT-EXT,TOC
 
:Content of the sidebar.
 
 
=== Edit Section Button ===
 
 
You can customize the appearance of the edit section button with system messages. You can also use customized CSS to change aligning etc. Tweeki's default button should look like this: <button wrapper="" class="btn btn-default btn-xs"><i class='icon icon-pencil'></i> Edit Section</button>
 
 
[[Mediawiki:Tweeki-editsection-text]]: Edit section
 
:Text for the Edit Section Button
 
 
[[Mediawiki:Tweeki-editsection-class]]: btn btn-default btn-xs
 
:Classes to use for the Edit Section Button
 
 
[[Mediawiki:Tweeki-editsection-icon]]: <i class='icon icon-pencil'></i>
 
:Icon to insert into the Edit Section Button
 
 
=== Link Customization ===
 
 
[[Mediawiki:Tweeki-login]]: {{Mediawiki:login}} / {{Mediawiki:createaccount}}
 
:Text used for the login link.
 
 
[[Mediawiki:Tweeki-toolbox]]: ''empty''
 
:Custom link content for toolbox dropdown. (e.g. <code><nowiki><i class="icon icon-cog"></i></nowiki></code>)
 
 
[[Mediawiki:Tweeki-edit-ext]]: Edit $1
 
:Text for the EDIT-EXT button
 
 
== Tweekihide parser function ==
 
 
Usage: <code><nowiki>{{#tweekihide:element1|element2|...}}</nowiki></code>
 
 
This parser function can be used to hide elements from a specific page (e.g. the main page).
 
 
You can use the following elements:
 
* page sections: navbar, navbar-brand, navbar-left, navbar-right, subnav, sidebar, firstHeading, footer
 
* navigational elements: EDIT, EDIT-EXT, PAGE, TOOLBOX, VARIANTS, VIEW, ACTIONS, PERSONAL, LOGIN, SIDEBAR, LANGUAGES, SEARCH, LOGO, FIRSTHEADING, TOC
 
 
=== Special navigational elements ===
 
 
==== EDIT ====
 
 
an "Edit Page" button for the current page
 
 
==== EDIT-EXT ====
 
 
to be used in the sidebar: a split dropdown with "Edit Page" and the other ACTIONS in the dropdown menu
 

Latest revision as of 13:55, 10 February 2015