DokuWiki

It's better when it's simple

User Tools

Site Tools


template:a_centered_perspective

This is an old revision of the document!


A_Centered_Perspective Template

Compatible with DokuWiki

new version doku

template Designed like the ADC.

Last updated on
2010-08-11

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Extension name contains underscore, will not generate popularity points.

Tagged with minimal, nice, sidebar, simplistic

The template features pulldown menus for the common toolbox of arctic and a menu based on the implementation of the navi-plugin. Just create an hierarchical list of links in the page “:menu”.

How to get the menu

You have to create a page “:menu” where you put in all the links in a hierarchical Dokuwiki-Syntax-formatted list like so:

  * [[:start]]
    * [[:subpage1]]
    * [[:subpage2]]
  * [[:someOtherPage]]

where then the links to “subpage1” and “subpage2” will only be visible when the visitor of you site is on the page “start”, “subpage1” and “subpage”, but not when he's on “someOtherPage”.

  • Adding a link to the root namespace is not working. When within another namespace (say in page ns:foo), the link to :start gets to ns:start – Alberto Simões - ambs at cpan.org
  • Yea, that is a bug. Somewhere in id “cleaning” the leading colon is lost. Messy code there that builds up navigation. To fix change tpl_functions.php lines 151ff to:
    $R->listcontent_open();
    $isParent = preg_match('/^(\w*:)*'.$info['page'].'(:\w*)*$/', $INFO['id'])>0;
    if(($format == 'xhtml') && $isParent )
      $R->doc .= '<span class="current">';
    $R->internallink(':'.$info['page'],$info['title']);
    if(($format == 'xhtml') && $isParent)
        $R->doc .= '</span>';
    $R->listcontent_close();

    Then you can delete much code upwards that computes the now no longer used array $parent (did not work, anyway). Note that now all links are expected to be given from root on but that should be no problem. akerbos 2010-Oct-22

Download and Install

Use the following URL to download this template:

Refer to template on how to install and use templates in DokuWiki.

Translations

Japanese

/lang/ja/settings.php

settings.php
<?php
/**
 * japanese language file for the configuration manager
 */
 
$lang['sidebar']                        = "サイドバーの設定";
$lang['pagename']                       = "サイドバー用ページ名";
$lang['trace']                          = "ページの冒頭にトレースを表示";
$lang['main_sidebar_always']			= "全ての名前空間にメインサイドバーを表示";
$lang['wiki_actionlinks']               = "操作リンクの表示方法";
$lang['user_sidebar_namespace']         = "ユーザーサイドバー用の名前空間";
$lang['group_sidebar_namespace']        = "グループサイドバー用の名前空間";
$lang['left_sidebar_order']             = "左サイドバーの順序(カンマ区切り)";
$lang['left_sidebar_content']           = "左サイドバーの内容";
$lang['left_sidebar_content_other']     = "その他の内容(カンマ区切り)";
$lang['right_sidebar_order']            = "右サイドバーの順序(カンマ区切り)";
$lang['right_sidebar_content']          = "右サイドバーの内容";
$lang['right_sidebar_content_other']    = "その他の内容(カンマ区切り)";
$lang['search']                         = "検索ボックスの位置(両サイドバー使用時のみ適用)";
$lang['closedwiki']                     = "非公開ウィキ(ログアウト時、ログインリンクのみ表示)"; 
$lang['hideactions']                    = "ログアウト時、ウィキ操作は全て隠す";
// vim:ts=4:sw=4:et:enc=utf-8:

Sites using this Template

Bugs?

Firefox 3.6.8 bug

In Firefox 3.6.8, I had to comment out line 439 in the this_design.css for the trace menu at the bottom to work properly:

.breadcrumbs {
    /*clear: both;*/
}

Is this a general bug, or unique to Firefox? Yes, I did clear the browser cache and purged the Dokuwiki cache also before trying this… Symon Bent 2010-Aug-27

Menu not showing up correctly. Fix: Pages must exist to show up correctly in the menu.

Category with no subcategories removes the horizontal line border. Fix: Open up this_design.css, find the line “.menu > ul > li > div > a {”, change to “.menu > ul > li > div a {”

Menu only works in the root namespace when using translation3 plugin. I installed translation3 plugin and can not figure out how to force the template to read ns1:sidebar and ns1:menu when using ns1 language. The plugin uses two-letter iso language codes to change translations. Pages :menu and :sidebar work only from root.

Icons beside search box in Chrome & IE

In Chrome & IE, the icons beside the search box do not show up.

FIXME Fix: Open this_design.css. In “.action-menu-title” add the following:

.action-menu-title {
       font-family: 'Arial Unicode MS', 'Microsoft Sans Serif', 'Free Sans', 'Gentium Plus', 'Gentium Basic', Gentium, GentiumAlt, 'DejaVu Sans', 'DejaVu Serif', 'Free Serif', 'TITUS Cyberbit Basic', 'Bitstream Cyberbit', 'Bitstream CyberBase', 'Doulos SIL', Code2000, Code2001;

       ....(rest of css goes here)
}

This doesn't seem to work for Chrome. It does work for IE. Any ideas on getting it to work in Chrome?

Other

  • On ACL installs, there is no 'Login' button showed for not logged in users when activating 'Closed Wiki' and 'Hide Wiki actions' I expect that 'Hide Wiki actions' still would show the login, otherwise I don't understand the use of that option ;) It also lacks the several 'subscribe' buttons? Casper 2010-Sep-05
  • FIXME Links inside the “menu” page break after entering a namespace. In other words after going into a namespace, all links in the menu sidebar break and will not successfully link back to the root namespace.
  • Temporary Fix (quick and dirty): replace following lines in tpl_functions.php
    1. line 54:
      'page' => cleanID($instructions[$i][1][0]),

      with this

      'page' => ":".cleanID($instructions[$i][1][0]),
    2. line 152:
       if(($format == 'xhtml') && (($info['page'] == $current) || in_array($info['page'],$parent)))

      with this

       if(($format == 'xhtml') && (($info['page'] == ":".$current) || in_array($info['page'],$parent)))
  • Fix: see how_to_get_the_menu akerbos 2010-Oct-22
  • FIXME There is a bug in the menu system causing the menu items to be shown only once even if they occur more often in the menu. If links to the same page will occur more than once, only the first occurrence of that link will show in the menu in the place it occurs first. Maurits Lamers October 17th 2010
  • FIXME CSS only supports webkit browsers (e.g. -webkit-border-(radius|gradient)).
  • Inserting pictures does not work with the Release Candidate of dokuwiki. MediaManager shows, but no code is inserted in editor after click on picture. Uploading and deleting works. Is it a template problem or a dokuwiki-version problem? (fle, 2010-10-25) +1 same issue (cricketbird 2010-30-10)
  • Even though my :menu page is successfully showing in the sidebar, the :sidebar page (along with an edit button) still shows up below it. Deleting the :sidebar page just causes dummy text to show up in its place. Any way to permanently remove the :sidebar page area from the sidebar and show just the :menu? (cricketbird 2010-10-25) +1 same issue! (punjabi 2010-10-28)
    • Found the solution to last problem. Go to admin and for the sidebar page, replace the text “sidebar” by “menu” (punjabi 2010-10-28) –Thanks (cricketbird). –I tried the same and now the menu looks good but the sidebar text and edit button still show at the bottom. Any recommendations? Thanks a lot (benedetoula).
    • I found the solution to HIDE the edit button. Open the “this_layout.css” and insert:
      div.main_sidebar .secedit {display: none;}
  • FIXME The option “Show trace at the top of the page” doesn't seem to work, the Trace is shown at the bottom. Or is this option for something else and I have to change the template? hagbard 2010-11-05
  • I think there is a bad reference for the 1st sub-level “class”. by TM 2010-12-07
<div class="menu">
<ul>
 <li class="level1"><div class="li">ok</div></li>
 <li class="level1"><div class="li">ok</div></li>
 <li class="level1"><div class="li"><span class="current">ok</span></div>
 <ul>
  <li class="level1"><div class="li"> ### </div></li>  <---   WRONG class for LI. Must be "level2"  
  <li class="level2"><div class="li"><span class="current"><span class="curid">ok</span></span></div>
  <ul>
  <li class="level2"><div class="li"> ### </div></li> <---  WRONG class for LI. Must be "level3"  
  <li class="level3"><div class="li"></div></li>
  </ul>
  </li>
<li class="level2"><div class="li">ok</div></li>
</ul>
</li>
</ul>
  • Quick fix for sub-level problem (SK 16.08.2012): Change line 145 in tpl_functions.php to:
$R->listitem_open($lvl+1);
  • Why are my menu items alway in small letters. How can i solve this?by PK September 7th
  • admin and edit button on top not clickable on iPad
  • FIXME Popup Viewer and Gallery Plugin doesn't work with this template. If you try to use them all pictures open in a new window. Most of the other plugins work, but you have a ReferenceError: Can't find variable: addInitEvent error in your console with this template. I think this template isn't under ongoing maintenance so I think the author won't fix it.
template/a_centered_perspective.1453100050.txt.gz · Last modified: 2016-01-18 07:54 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki