Revision [17538]
This is an old revision of TabsMenu made by AndreasHeintze on 2007-09-28 03:40:58.
TabsMenu
This is what you will get:
By adding this piece of code on your pages:
:::[[FirstTab This is the first tab]]::[[SecondTab Second tab]]::@[[ThirdTab Third tab]]::[[LastTab Last tab]]:::
..and here is what you need to add to your wikka system:
In wikka.css add:
/* Action: tab */
.tabline {
margin: 0px;
border-bottom: 1px solid #000;
background-color: #F7F7F7;
}
.activetab {
margin: 0px;
padding-left: 4px;
padding-right: 4px;
border-top: 2px solid #000;
border-left: 1px solid #000;
border-right: 1px solid #000;
background-color: #F7F7F7;
}
.inactivetab {
margin: 0px;
padding-left: 4px;
padding-right: 4px;
border: 1px solid #000;
background-color: #E0E0E0;
}
.tabline {
margin: 0px;
border-bottom: 1px solid #000;
background-color: #F7F7F7;
}
.activetab {
margin: 0px;
padding-left: 4px;
padding-right: 4px;
border-top: 2px solid #000;
border-left: 1px solid #000;
border-right: 1px solid #000;
background-color: #F7F7F7;
}
.inactivetab {
margin: 0px;
padding-left: 4px;
padding-right: 4px;
border: 1px solid #000;
background-color: #E0E0E0;
}
You may need to change the background color to match your pages backgrounds.
In wakka.php add this:
- "/(".
- ":::.*?:::|". # TabsMenu <== just add this line
- <snip>...
- // TabsMenu
- {
- // Determine if first tab is active or not
- $output = $matches[1];
- $tabclass = 'activetab';
- }
- else {
- $tabclass = 'inactivetab';
- }
- // Fix links or other wiki markup inside tabs
- "/(".
- "\"\".*?\"\"|". # literal
- "\[\[[^\[]*?\]\]|". # forced link
- "\b[a-z]+:\/\/\S+|". # URL
- "\*\*|\'\'|\#\#|\#\%|@@|::c::|\>\>|\<\<|££|¥¥|\+\+|__|<|>|\/\/|". # Wiki markup
- "======|=====|====|===|==|". # headings
- "\{\{.*?\}\}|". # action
- "\b[A-ZÅÄÖÜ][A-Za-zÅÄÖÜßåäöü]+[:](?![=_])\S*\b|". # InterWiki link
- "\b([A-ZÅÄÖÜ]+[a-zßåäöü]+[A-Z0-9ÅÄÖÜ][A-Za-z0-9ÅÄÖÜßåäöü]*)\b|". # CamelWords
- "\n". # new line
- ")/ms", "wakka2callback", $output);
- return '<span class="tabline"> </span><span class="' . $tabclass . '">' . $output . '</span><span class="tabline"> </span>';
- }