Это старая версия документа.
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/inc/parser/handler.php on line 1458
Warning: Declaration of syntax_plugin_tablecalc::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/tablecalc/syntax.php on line 41
Warning: Declaration of syntax_plugin_tablecalc::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/tablecalc/syntax.php on line 72
Warning: Declaration of syntax_plugin_offline::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/offline/syntax.php on line 60
Warning: Declaration of syntax_plugin_offline::render($format, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/offline/syntax.php on line 67
Warning: preg_match(): Compilation failed: invalid range in character class at offset 3416 in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/inc/parser/lexer.php on line 118
====== Доработка боковой панели sidebar ====== В версии DokuWiki от 2012-09-10 “Adora Belle” RC1 по умолчанию добавлена боковая панель. Содержимое панели хранится в файлах sidebar.txt по всему namespace, что позволяет панели быть контекстной. Недостаток дефолтовой панели - невозможность кастомизации по текущему пользователю и группам. Проблема решается доработкой файла ''inc/template.php'':\\ \\ До замены: <code php> function tpl_sidebar($print = true) { global $conf; $sidebar = page_findnearest($conf['sidebar']); if($sidebar) return tpl_include_page($sidebar, $print); return ''; } </code> После замены: <code php> function tpl_sidebar($print = true) { global $conf; global $INFO; $sidebar = page_findnearest($conf['sidebar']); $sidebaruser = page_findnearest("user:".$_SERVER['REMOTE_USER'].':'.$conf['sidebar']); $sidebarnew =""; if ($sidebar) $sidebarnew = $sidebarnew.tpl_include_page($sidebar, $print); if ($INFO['userinfo']['name'] != "") { foreach($INFO['userinfo']['grps'] as $grp) { $group_sb = "group".':'.$grp.':'.$conf['sidebar']; $sidebargroup = page_findnearest($group_sb); if ($sidebargroup) $sidebargroup = $sidebarnew.tpl_include_page($sidebargroup, $print); } if ($sidebaruser) $sidebarnew = $sidebarnew.tpl_include_page($sidebaruser, $print); } return $sidebarnew; } </code> Определение панелей для пользователей:\\ ''data/pages/user/<username>/sidebar.txt''\\ \\ Определение панелей для групп:\\ ''data/pages/group/<groupname>/sidebar.txt''\\ Например, чтобы отредактировать панель пользователя jamis7005 набираем в браузере url: ''http://www.prom-auto.ru/wiki/doku.php?id=user:jamis7005:sidebar''