Strict Standards: Declaration of action_plugin_importoldchangelog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/dnicolaas/nicolaas.net/dokuwiki/lib/plugins/importoldchangelog/action.php on line 8

Strict Standards: Declaration of action_plugin_importoldindex::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/dnicolaas/nicolaas.net/dokuwiki/lib/plugins/importoldindex/action.php on line 0

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/dnicolaas/nicolaas.net/dokuwiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/dnicolaas/nicolaas.net/dokuwiki/lib/plugins/importoldchangelog/action.php:8) in /home/dnicolaas/nicolaas.net/dokuwiki/inc/auth.php on line 295

Strict Standards: Only variables should be passed by reference in /home/dnicolaas/nicolaas.net/dokuwiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/dnicolaas/nicolaas.net/dokuwiki/lib/plugins/importoldchangelog/action.php:8) in /home/dnicolaas/nicolaas.net/dokuwiki/inc/actions.php on line 154
faq:start [Dion's DokuWiki Development]
 

The FAQ plugin

Comparing Wikis in http://www.wikimatrix.org/ I found out that DokuWiki is missing FAQ tags. I thought that was a shame for a documentation Wiki, so I wrote a very simple plugin: the FAQ plugin.

Download and Installation

Download and install the plugin using the http://www.dokuwiki.org/plugin:plugin using the following URL. Refer to http://www.dokuwiki.org/:Plugins on how to install plugins manually.

Description

The FAQ plugin provides a way to write FAQ lists. It uses DokuWiki headers, but slightly different: they have their own syntax, and they have their own HTML span in them, so you can have your own style for them. Writing a FAQ is exactly the same as writing a normal DokuWiki page, but still the page stands out as a FAQ.

Syntax

Instead of '=', use '?' in your headers:

?????? Is this a level 1 FAQ? ??????

Yes, it is!

????? Would this be a level 2 FAQ? ?????

Indeed.

Demo

Basic FAQs

What is the FAQ Plugin?

The FAQ plugin is a plugin that facilitates writing FAQ lists. It offers a simple syntax for writing FAQs.

Can't you do that using a definition list? or normal list? Or just paragraphs?

Sure. but by having special markup for FAQs, you can show them different from other things, but consistently. Furthermore, the FAQ plugin uses normal DokuWiki headers, so you will have a table of FAQs on top of your page.

Can I have markup inside my answers?

Yes. The answers are just normal sections, so you can insert simple markup and
 more complicated stuff

in your answers. You can use the full power of DokuWiki in your FAQ, including any plugins.

Advanced FAQ

Can I have more than one FAQ list on one page?

Yes. FAQs are just headers that are dislayed differently; you can mix them with normal headers. That way you can have sections of FAQs. Also, you can have several levels of FAQs, if you have related sub-questions.

Can I try this out myself?

Sure. Go ahead and try it out on the demo page.

Feedback

  • 2009-01-08 : Level 2 FAQ seems to be shifted extra 20px. so the answer portion is 20px to the left of the Q. is it by design?

The FAQ plugin uses your own header layout for FAQs. The only thing different by default is the colour. Depending on your template, this might look OK or not.

Dion Nicolaas 2009/02/16 14:18

  • 2011-04-12: I had this problem too. Indent of headlines and content is wrong. I looked at the code and the order of the tags is different.
  • ---- Doku ---
      <h1><a>Headline 1</a></h1>
      <div class="level1"><p>Lorem ipsum...</p></div>
      
      <h2><a>Headline 2</a></h2>
      <div class="level2"><p>Lorem ipsum...</p></div>
    
    ---- FAQ ---
      <div class="level1">
        <h1 class="faq"><a><span class="faq">FAQ 1</span></a></h1>
        <br />Lorem ipsum..
      </div>
    
      <div class="level2">
        <h2 class="faq"><a><span class="faq">FAQ 2</span></a></h2>
        <br />Lorem ipsum...
      </div>
    
  • I coud fix it adding CSS div.dokuwiki div.level# h#.faq {margin-left: [try some numbers]px; , but perhaps you could make an update?
  • It woud be better the style.css in the plugin would be span.faq {color: __missing__;} or something like that. Because of template switching. My template was red-brown and first I thought it wouldn't work.
  • Nice plugin, thanks.
 
faq/start.txt · Last modified: 2011/04/12 00:37 by 84.174.14.85
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

Strict Standards: Only variables should be passed by reference in /home/dnicolaas/nicolaas.net/dokuwiki/doku.php on line 79