Table of Contents

Folded Plugin

Compatible with DokuWiki

2007-06-26 and later

plugin Foldable page sections

Last updated on
2011-12-26
Provides
Syntax
Repository
Source

Download

Download Latest Archive

Description

This plugin is based on the inline folding plugin by ta' Lajżar and the slightly changed version thereof by Christopher Smith and Esther Brunner.

(A lot of the work was based on the older hacks by Chris Stoll. This one combines the features of all plugin variants in one.)

Usage

If you want to make additional information available that is hidden by default, you have two options with this plugin:

Inline:

This is example ++text | with some of it only shown when you unfold it++. And after that
the text just continues to flow in the same paragraph.

Block:

This is example text.

++++ Title |

| This table | is only shown | when you unfold the block |

{{page>some other wiki page}}

++++
. Inline Block
Syntax ++title| formatted text ++ ++++title| any content ++++
HTML <span> tag <div> tag
Can contain formatting :-) :-)
Can contain block elements1) :-)
Can be used within a paragraph, table, list, etc. :-)

You can see the plugin in action here FIXME.

Note: As of version 2005-09-02 the syntax has changed to allow linked titles to unfold and fold the section. The pipe char between title and text is mandatory.

Installation

You can install this plugin with the plugin manager.

To install the plugin manually:

  1. download the source to your plugin folder, lib/plugins.
  2. extract the downloaded files contents.

That should create a new folder lib/plugins/folded containing all the files required by the plugin.

conf                 folder containing the configuration settings and their metadata
conf/default.php     default values for configuration settings
conf/metadata.php    configuration setting metadata used by [[plugin:config|Configuration Manger]]
lang                 folder containing all the localised language folders
lang/xx              xx = language code, there maybe several of these, at least one being en for english
lang/xx/lang.php     language strings for language code "xx"
lang/xx/settings.php configuration prompts used by [[plugin:config|Configuration Manger]]
script.js            JavaScript to handle hiding and revealing of folded content
style.css            styles for folding labels and folded content
open.gif             arrow image pointing right
closed.gif           arrow image pointing down
syntax               folder containing the plugin scripts
syntax/span.php      plugin script for inline folding (++)
syntax/div.php       plugin script for block folded (++++)

The plugin is now installed.

Configuration

There are two configuration settings which can be used to override the folder link tooltips. These will be most useful for DokuWiki installations using a language not included with the plugin.

reveal — the title tooltip to be used by folding links when the folded content is hidden. If left empty the localised string will be used.

hide — the title tooltip to be used by folding links when the folded content is showing. If left empty the localised string will be used.

Localization

Please feel free to add the strings for your own language here and I will add them to the next release of the plugin. If your language isn't included at present, you can override the strings that are shown using the plugin's configuration settings as described above.

Language title string title string alt string alt string
English reveal hide reveal hidden content hide content
<language> […] […] […] […]

There are also two strings used in the admin/configuration page.

Language for hide string setting for reveal string setting
english Folding tooltip to hide<br />(leave empty to use localized string) Folding tooltip to reveal<br />(leave empty to use localized string)
[…] […]

Bugs / Feature Requests

Please report bugs or feature requests at the Bug tracker.

Revision List

Recent commits to Folded Plugin (RSS feed)

Requested Features / To Do

Would it be possible to use an image instead of text? the idea is to have a small image “help.png” to open a local explanation in a box. Thank you. Michel 2011-12-30

Discussion

Please see the separate discussion page

1) like tables, lists, new paragraphs, included files, etc.