Extension:Header Tabs
From MediaWiki.org
|
Header Tabs Release status: beta |
|
|---|---|
| Implementation | Parser function, User interface |
| Description | Extension replaces top-level headers with tabs (using YUI) |
| Author(s) | Sergey Chernyshev Talk |
| Version | 0.6 |
| Download | SVN |
| Example | interest page on Ardorado.com |
This extension transforms top-level MediaWiki headers into tabs using Yahoo! YUI library.
It was originally developed for Ardorado.com and maintained by Semantic Communities LLC.
Contents |
[edit] Usage
To enable tabs on a page after you installed the extension, you need to add
<headertabs/>
tag into the page in place where the last tab should end (everything below this tag will be shown under the tab view. Most of the times though, you'll want to put it at the bottom of the page.
In addition to that, page should have top level headers defined in it like this:
= Header title =
[edit] {{#switchtablink}}
To allow users to switch to specific tab by just clicking a link on the page (in another tab or outside tab view), you can call {{#switchtablink}} parser function like this:
{{#switchtablink:Header Text|Link Text}}
This will create a link that opens a tab with "Header Text" title, the text of the link will say "Link Text".
[edit] Semantic MediaWiki factbox
In addition to user-defined tabs, Header Tabs converts Semantic MediaWiki factbox into a tab and adds it as a last tab in tab view.
[edit] Example
Some text above the tab view
= First section header =
This will be displayed on first tab
{{#switchtablink:Second section header|Click here to go to the next tab...}}
= Second section header =
This will be displayed on second tab
<headertabs/>
= Third section header =
This will be always displayed under the tab view because it's below <nowiki><headertabs/><nowiki> tag.
Header titles get automatically converted into tab titles.
[edit] Download instructions
[edit] Installing from SVN
To get code from Subversion, just type
svn checkout http://mediawiki-header-tabs.googlecode.com/svn/trunk/ HeaderTabs
[edit] Installation
Download the code into $IP/extensions/ folder. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.
Add the following to LocalSettings.php:
require_once("$IP/extensions/HeaderTabs/HeaderTabs.php");
[edit] Skin modification
If you want to override YUI skin, feel free to modify your skin and assign skin class (e.g. yui-skin-sam) to <body> tag. See YUI skinning documentation for more details.
[edit] Configuration parameters
[edit] $htYUIBase
$htYUIBase variable defines path to the YUI installation, by default it uses YUI hosted on Yahoo! servers.
$htYUIBase = '/yui/';
[edit] $htUseHistory
$htUseHistory variable defines if tab navigation should be tracked within the URL updating the hash value, by default history is used.
$htUseHistory = false; // disable tab navigation history
[edit] Known issues
- Table of contents doesn't make much sense when tabs are used. Right now you can disable it with
__NOTOC__. Later versions might force this.
[edit] CHANGES
- 0.6 (May 8, 2008) - Added
{{#switchtablink}}parser function - 0.5 (May 5, 2008) - Upgraded to YUI version 2.5.1 which has History module in production, not beta
- 0.4 (April 8, 2008) - Rolled back 0.2 changes because of some weird problem with cache. Not loading history JS library if
$htUseHistoryis set tofalse - 0.3 (April 8, 2008) - Now History can be disabled using
$htUseHistoryvariable (true by default) - 0.2 (April 8, 2008) - All JS and CSS are inserted only when page has tabs
- 0.1 (March 20, 2008) - Initial public release

