% cd /lib/tpl/
% git clone https://github.com/samfisch/dokuwiki-template-arctic.git arctic
**Debian install (or probably any other distribution):**
% cd /usr/share/dokuwiki/lib/tpl/
% wget http://r.notomorrow.de/dokuwiki-template-arctic/pkg/arctic-stable.tgz
% tar xzvf template-arctic-stable.tgz
===== Extension Manager =====
Since release 20140516 the stable and master branches have the template.info.txt and can be installed automatically using the extension manager (available in Dokuwiki Ponder Stibbons)
===== Configuration =====
The template can be widely configured via the configuration manager. These are the available options (reflecting the ones of the latest release):
^ Option ^ Value(s) ^
| Sidebar setup | left/right/both/none |
| Pagename to use for sidebars | defaults to ''sidebar'' |
| Trace | show trace on top |
| Main sidebar always | show main sidebar in every namespace (default) |
| Actionlink style | buttons/links |
| Namespace for group sidebars | defaults to ''group'' |
| Namespace for user sidebars | defaults to ''user'' |
| Left sidebar order | comma separated list of sidebars (all sidebars defined in the content section not listed here will show up after the one you specify here in no particular order) |
| Content of the left sidebar | multicheckbox to select the different [[.:arctic#sidebar types|sidebar types]] which should be active inside the left sidebar |
| Right sidebar order | comma separated list of sidebars (all sidebars defined in the content section not listed here will show up after the one you specify here in no particular order) |
| Content of the right sidebar | multicheckbox to select the different [[.:arctic#sidebar types|sidebar types]] which should be active inside the right sidebar |
| Position of the search field (only applies if both sidebars are used) | left/right |
| Closed Wiki | hide all sidebars regardless of their ACLs and show login button to not logged in users |
| Hide Actions | hide all actions to non logged in users (this makes sense if you have a read only wiki). The login form is only available by appending ?do=login to the URL |
===== Sidebar Types =====
These are the different sidebar types.
^ Type ^ Description ^
| main | see [[.:arctic#adding the main sidebar|main sidebar]] |
| user | see [[.:arctic#adding a user sidebar|user sidebar]] |
| group | see [[.:arctic#adding a group sidebar|group sidebar]] |
| namespace | see [[.:arctic#adding a namespace sidebar|namespace sidebar]] |
| index | shows the DokuWiki index |
| toc | shows the TOC of the current page inside the sidebar instead of in the page itself |
| trace | shows the trace |
| toolbox | shows the set of "action links" (login, edit, index, etc.) inside the sidebar, instead of their default location in horizontal toolbars above and below the page |
| extra | There are 2 new files inside ''
- add "helloworld" to the list of comma separated sidebars in the configuration manager.
Here's a list of other [[.:arctic#custom sidebar examples]].
===== Custom Sidebar Examples =====
Here are some more examples of custom sidebars for the arctic template.
**Feel free to contribute, just post your custom sidebars to this page ;-)!**
==== Current ID ====
How can I get current id highlighting to work? I copied the following into arctic_layout.css and layout.css in the arctic template folder, but it didn't work.
''/* ---- Current ID highlighting ---- */\\
.curid {\\
font-weight: bold;\\
}''
Try:\\
''div.dokuwiki .curid a.wikilink1 {\\
font-weight:bold;\\
}''\\
==== Donation Cloud Sidebar ====
FIXME
Here it's an example for WordPress
[[http://www.zirona.com/software/wordpress-donations-cloud/|Donation cloud]]
I'm interested in integrating this into my arctic template.
==== Backlinks ====
Shows the backlinks to the current viewed page. You have to add "backlinks" to the comma separated list of other sidebars in the arctic template settings.
''/lib/tpl/arctic/sidebars/backlinks/sidebar.php''
==== Cloud Plugin ====
For the [[plugin:cloud|Cloud Plugin]] you can use the following snippet:
''/lib/tpl/arctic/sidebars/cloud/sidebar.php''
==== Site TOC ====
Creates a site wide TOC and highlights the current page in it.
Open and closed folders and files can have different CSS-symbols once I have
figured out where to put the CSS :-)
''/lib/tpl/arctic/sidebars/sitetoc/sidebar.php''
0){
// Determine Page Title from first heading
$firstHeading = p_get_first_heading($startPageID);
if($conf['useheading'] && !empty($firstHeading)){
$linkName = $firstHeading;
}else{
$linkName = $startPageName;
}
// echo "" . $conf['useheading'] ."";
tpl_pageLinkCreate($startPageID, $linkName, "tpl_processStartPage:$context");
}
}
}
function tpl_pageLinkCreate($fileToLinkID, $linkName, $calledFrom) {
global $ID;
echo "";
if($fileToLinkID == $ID){
// highlight current page
echo "";
}
if($_REQUEST["do"] == "admin" && $_REQUEST["page"] == "acl"){
$path = wl($fileToLinkID, "do=admin&page=acl");
}else{
$path = wl($fileToLinkID);
}
// echo "$fileToLinkID, $linkName, $calledFrom";
tpl_link($path,$linkName);
if($fileToLinkID == $ID){
// current page
echo "";
}
}
function tpl_list_folder($dataList, $findAndProcessStartpage){
global $conf;
global $ID;
global $INFO;
require_once(DOKU_INC.'inc/auth.php');
$currentLevel = 1;
$pathinfo = pathinfo($_SERVER['REQUEST_URI']);
$url = $pathinfo['dirname'];
echo "\n";
tpl_processStartPage("","tof");
for($i=0; $i 0){
// don't show start page in normal order
if (noNS($dataList[$i]["id"]) != $conf['start']) {
// FIXME not sure if this is actually needed
// Could we not use noNS($dataList[$i]["id"]) instead???
$pageFileName = split(":", $dataList[$i]["id"]);
$pageFileName = $pageFileName[count($pageFileName) - 1];
$pageFileName = str_replace("_", " ", $pageFileName);
// Determine Page Title from first heading
$firstHeading = p_get_first_heading($dataList[$i]["id"]);
if($conf['useheading'] && $dataList[$i]["type"] == "f" && !empty($firstHeading)){
$linkName = $firstHeading;
}else{
$linkName = $pageFileName;
}
// Adjust the level. If level of page is higher than current level
// close list-item and list
// FIXME: Why is this needed when the same happens down below?
if($currentLevel > $dataList[$i]["level"]){
echo str_repeat("
\n", $currentLevel - $dataList[$i]["level"]);
$currentLevel = $dataList[$i]["level"];
}
// if entry is a folder
if($dataList[$i]["type"] == "d"){
if($dataList[$i]["open"]){
echo "";
}else{
echo " ";
}
if($_REQUEST["do"] == "admin" && $_REQUEST["page"] == "acl"){
$path = wl($dataList[$i]["id"].":".$conf['start'], "do=admin&page=acl");
}else{
$path = wl($dataList[$i]["id"].":".$conf['start']);
}
// echo "Path: $path, LinkName: $linkName
";
tpl_link($path,$linkName);
}else{
// entry is a file
// echo "Path: $path, LinkName: $linkName, id: ". $dataList[$i]["id"] . "
";
tpl_pageLinkCreate ($dataList[$i]["id"], $linkName, "direkt:tpl_list_folder" );
}
if($dataList[$i+1]["level"] == $currentLevel){
// current folder (just close list-item)
echo " \n";
}else if($dataList[$i+1]["level"] > $currentLevel){
// new sub-folder (start new sub-list)
echo "\n";
// Check if a start page exists and add it first
tpl_processStartPage($dataList[$i]["id"],"");
}else if($dataList[$i+1]["level"] < $currentLevel){
// end of sub-folder (close open sublists)
if(!empty($dataList[$i+1]["level"])){
echo str_repeat("
\n", $currentLevel - $dataList[$i+1]["level"]);
}
}
$currentLevel = $dataList[$i+1]["level"];
}
}
}
echo "\n";
}
global $ID;
global $ACT;
global $conf;
$folder = getNS($ID);
require_once(DOKU_INC.'inc/search.php');
require_once(DOKU_INC.'inc/html.php');
$ns = cleanID($ID);
if(empty($ns)){
$ns = dirname(str_replace(':','/',$ID));
if($ns == '.') $ns ='';
}
$ns = utf8_encodeFN(str_replace(':','/',$ns));
$list = array();
search($list,$conf['datadir'],'search_index',array('ns' => $ns));
tpl_list_folder($list,true);
?>
Have fun,
Ferdinand
==== Twitter Feed ====
This displays the latest tweets from a given Twitter account (presumably yours). Adjust the variables and CSS to suit your needs. (Shamelessly ripped from the twitter.com/widgets service.)
''/lib/tpl/arctic/sidebars/twitter/sidebar.php''
==== Clock Sidebar ====
If you have installed the [[plugin:clock|Clock Plugin]], you can enable it as a sidebar for your wiki installation. Just create the adequate file for the sidebar to work:
''/lib/tpl/arctic/sidebars/clock/sidebar.php''
The ''substr'' operation is necessary to ensure that DokuWiki generates XHTML-compliant code: the output of the clock plugin is encased in a ''
Bookmark
array('link' => 'http://del.icio.us/post?title=%title%&url=%link%', 'image' => 'delicious.png'),
'Digg' => array('link' => 'http://digg.com/submit?phase=2&title=%title%&url=%link%', 'image' => 'digg.png'),
'Facebook' => array('link' => 'http://www.facebook.com/sharer.php?u=%link%&t=%title%', 'image' => 'facebook.png'),
'Twitter' => array('link' => 'http://twitter.com/home?status=%title%:%link%', 'image' => 'twitter.png'),
'Google' => array('link' => 'http://www.google.com/bookmarks/mark?op=add&title=%title%&bkmk=%link%', 'image' => 'google.png'),
'Google Buzz' => array('link' => 'http://www.google.com/buzz/post?url=%link%&message=%title%', 'image' => 'buzz.png'),
'Stumbleupon' => array('link' => 'http://www.stumbleupon.com/submit?url=%link%&title=%title%', 'image' => 'stumble.png')
);
$title = rawurlencode(p_get_metadata($ID, "title")." [".strip_tags($conf['title'])."]");
$link = rawurlencode(wl($ID,'',true));
$before = array("%title%", "%link%");
$after = array($title, $link);
foreach ($bookmarks as $key => $value)
{
$url = str_replace ($before, $after, $value["link"]);
$image = DOKU_TPL."images/".$value["image"];
$text = "Bookmark to ".$key;
?>
You can use free icons from http://nouveller.deviantart.com/art/Social-Media-Bookmark-Icon-125995730.
Source : [[http://blog.slucas.fr/en/oss/dokuwiki-arctic-sidebar|here]]
==== Translation ====
you need to install the [[plugin:translation]] plugin,
place following code in a translation directory in the sidebars directory,
:!: Looks like you haven't created the main sidebar yet. Do it now by creating the following page: LINK
Once you've created the page, just add an unordered list of links to create the navigation i.e.:
* [[link 1]]
* [[link 2]]
* [[link 3]]
You can also use one of the many available index [[doku>plugins]].
For further information about sidebars refer to the template [[doku>template:arctic#first steps|documenation]].
===== Credits/Thanks =====
Some of the Ideas are taken from the other great [[:templates|DokuWiki templates]]. Furthermore a big "**Thank you!**" to the great DokuWiki team for your very good looking and well structured default template and this cool Wiki!
===== Sites using this Template =====
Add yours here:
* [[http://samuele.netsons.org]]
* [[http://complex.if.uff.br|Complex Systems]] - Complex Systems Research Group website, Universidade Federal Fluminense, Niterói, Brazil
* [[http://www.mgv-hochmoessingen.de/]] - Homepage of a choral society - **THX to Che** this is a very good template for CMS
* [[http://wiki.vehtoh.de]] - a semi-private, outsourced Brain (powerd by Dokuwiki and your great (little bit modified) template ;), feel free to contact me for the coffee!!!
* [[http://www.seiichiro0185.org/]] My private Homepage about Linux and Tech stuff - arctic with some modifications through userstyle.css - Thanks for dokuwiki and this great template! -
* [[http://www.symbolic-link.org/schifffahrtwiki]] - Eine Site über Schiffe und Museen
===== FAQ =====
==== How to use an image instead of the root link in the header ====
see below.
==== How to add Google AdSense? ====
You can add Google AdSense to the Arctic template (or any other DokuWiki template) by adding the needed piece of code directly into ''
or
and insert the AdSense code before the closing div. If you want AdSense to show up in the ''footer'' just insert the required lines into ''
div.dokuwiki .header {
background:url(lib/tpl/arctic/images/[name-of-your-image]) no-repeat;
}
Then edit ''
div.dokuwiki div.left_sidebar {
background: url('lib/tpl/arctic/images/filename.png') no-repeat;
padding-top: [height of your logo in px]px;
}
> Wouldn't it be easier to insert an image using standard wiki images?
{{ :logo.png?100 |}}
==== How to hide empty namespaces from the sidebar index? ====
You can use for example the [[plugin:navi|navi]] plugin in a sidebar as an alternative to the default index.
==== How to make the height of the page bigger by default (not IE compatible)? ====
To get a bigger main page by default, you need to edit your ''
div.dokuwiki div.left_sidebar,
div.dokuwiki div.right_sidebar {
min-height: 350px;
}
Of course, you can change the ''min-height'' property to whatever you want.
==== How to change the search button to an image? ====
Here's a little CSS trick. You may have to play with the padding value a bit, it just moves the text away from the image - and you have to choose the color value to be of the same as your background in order to make the text //disappear//. In your ''
div.dokuwiki form#dw__search input.button {
border: none;
background: url(images/search.png) no-repeat;
padding-left: 50px;
color: #fff;
width: 25px;
}
==== The editing toolbar is missing, what can I do? ====
See [[faq:toolbar]].
==== How to change the width of the search field? ====
You can set the width by adding the following CSS to your ''
div.dokuwiki #qsearch__in {
width: [width]px;
}
The code up above is not working for me. This code works for me:
div.dokuwiki div.left_sidebar form#dw__search input.edit, div.dokuwiki div.right_sidebar form#dw__search input.edit {
margin-left: 0;
font-size: 100%;
width: 80%;
}
==== How to reference images in a custom sidebar? ====
It depends on if you use URL rewriting or not (following code is untested but //should// work). If you want absolute links replace ''DOKU_BASE'' with ''DOKU_URL'':
// your image ID
$IMG_ID = 'namespace:image.jpg';
$w = '100'; //width
$h = '100'; //height
// with URL rewriting
print '';
// without URL rewriting
print '';
==== How to quickly make it Smartphone ready ====
div.pagename {
display: none;
}
==== How to include links for dw2pdf plugin and/or bookcreator plugin? ====
There are different ways to have links for [[plugin:dw2pdf|dw2pdf]] and/or [[plugin:bookcreator|bookcreator]] plugin in the arctic template. For me the following works well:
* Edit your ''\lib\tpl\arctic\main.php''.
* Search for the ''