Template Compatibility

Major Problems

For me, this plugin does not work at all. I changed template to default and deleted sidebar template (which worked just fine). I also have disabled all other plugins, yet the screen turns all white, and nothing shows up in source code, no matter what page I go to. I have to manually delete sidebar plugin to have it work.
—Marcus

You might have to delete the DokuWiki cache (e.g. using cacherevisionseraser). As long as the plugin is correctly loaded, there MUST be some <div id=“sidebar”> in the page source.

I find the same behaviour as Marcus. Even with a freshly unpacked DokuWiki distribution (2009-02-14), with empty cache, putting the sidebar directory in lib/plugins gives a white screen.
—Garrelt

I just tried it on my local webserver with the latest DW version: unpacked, ran install.php, downloaded plugin via Plugin Manager, enabled plugin … and everything works fine. Do you use a special language or page encoding? Is there anything in the error log? —mARKUS

I unpack DokuWiki, run install.php, untar the sidebar.tar.gz file in lib/plugins (Plugin Manager does not seem to work for me due to permission problems), and after that every access to a page (configuration manager, start page, etc…) gives a blank screen. The Firefox error log seems to be empty – Garrelt

Using citation 1) I recognized, that obviously the same stylesheet (of the main page) is used for showing the citation-text while MouseOver. This results in partly invisibility of the citation/popup, because the first column is blank (sidebar) and the border/size of the main window is ignored. While the citations at the end of the line is not visible, you see nothing of the text. DokuWiki 2009-02-14 & latest plugin sidebar

You render a div with id #sidebartop, even if breadcrumbs are disabled, causing a gray bar to overlap the title.

The sidebar displays even when access to the whole wiki is restricted and the user hasn't logged in. Is there a way to change the contents of the sidebar for locked pages?

Troubleshooting

If after enabling the plugin, the sidebar displays on the bottom of the page, you probably need to clear your cache (usually Ctrl+F5 on most browsers).

Feature Requests

Can we have some way of setting the width of the sidebar?

You/we/I can't really test template compatibility if the goal/functioning of the plugin is just vaguely clear,

p.s. seems to work with my on-going hack of minimal template (with work I mean: something is displayed)

the sidebar is injected after the TPL_ACT_RENDER event, which should be after the main content output, see tpl_act_render

can the trace be displayed above the content area (above both sidebar and page area, rather than just above page area)?

It would be nice if the sidebar respected the useheading setting like the hierarchical navigation path (“youarehere”) does, i.e. if useheading is set, the sidebar should display the Text of the first heading of the entry page in the namespace, …:<ns>:start(.txt) or …:<ns>(.txt). Now if I set useheading, the sidebar displays the heading on pages and the namespace name on namespaces.

Is it possible to install a config-switch (checkOnOff) to open the namespace start-page by clicking on the sidebar-navigation entry of the namespace. Instead of listing “start” in the sidebar. The name of the “start”-page is a config-data of dokuwiki, where the name can be achieved, if it is changed by the admin. Like plugin indexmenu. — Ludwig 28.12.2009

Programming Recommendations

Hi just a couple of remarks:

Never use tpl_content() to display a wikipage, you will trigger als sorts of events again and enter a recursion (you omit that in your plugin, but this also keeps, under certain circumstances other plugins which use the same event from being executet at all!) … instead use p_wiki_xhtml($ID) which can be found in inc/parserutils.php. p_wiki_xhtml($ID) will handle the permissions automatically for you, so you don't have to check anymore if you should display the edit button or not, it will be displayed if the user has sufficient rights.

Don't output <style> tags in the XHTML body, it's not valid. Instead put your CSS in a file named style.css respectively print.css inside the plugin directory. DokuWiki will automatically add it into the CSS it uses (this makes your plugin also work if javascript is disabled ).

Same goes for the Javascript. As with the CSS, you can put the JS you need in a file named script.js and DokuWiki will use it automatically.

It would probably be better to use TPL_CONTENT_DISPLAY and append the sidebar to the XHTML instead of TPL_ACT_RENDER, that way you won't have to worry about open/closed divs.