Arakhnê.org / Web Tools / CollapsableText

MediaWiki Extension CollapsableText

CollapsableText is an extension of MediaWiki to create automatically portions of text which are collapsable.

Installation

  1. Download CrossReference,
  2. Unpack the archive in your Mediawiki directory
  3. add require_once($IP.'/extensions/CollapsableText/CollapsableText.php'); in your LocalSettings.php.
  4. You should skip this step if your mediawiki installation directory is the same as your Apache document directory. Icons used by this extensions should be accessible from the web client navigator. Icons are inside the directory extensions/CollapsableText/public. You must make this directory accessible from a browser with the URL /extensions/CollapsableText/:
    1. on Unix operating systems (including MacOS X): $> ln -s /path/to/mediawiki/extensions/CollapsableText/public /path/to/apache/document/root/wiki/extensions/CollapsableText
    2. on other operating systems (including Windows®): copy the content of /path/to/mediawiki/extensions/CollapsableText/public into /path/to/apache/document/root/wiki/extensions/CollapsableText

Usage

General Usage

CollapsableText extension provides only one HTML tag: <collapsetext>. This tag permits to mark some part of the wikitext as collapsable:
<collapsetext>This is the Title (always visible). This is the collapsed text (visible when not collapse).</collapsetext>

The text inside <collapsetext/> is parsed to detect a part which must be always visible and a part will should be invisible. The rules to detect both parts are (in prefered order):

  1. The first occurrence of the tag <collapse> is the limit between the two parts.
    Example: <collapsetext>ABC. DEF.<collapse>GHI.</collapsetext>,
    ABC. DEF.
  2. The first part is enclosed by braces.
    Example: <collapsetext>ABC. DEF. GHI.</collapsetext>,
    ABC. DEF.
  3. The first part is the first sentence (first occurrence of the point).
    Example: <collapsetext>ABC. DEF. GHI.</collapsetext>,
    ABC.

Tag Parameters

Tag <collapsetext/> accepts parameters:

  • show="true" or show="false": permits to force the visibility flag when showing up the page (default is false);
  • titleclass="css_style": permits to change the CSS class associated to the first part of the text (default is collapsedtexttitle);
  • bodyclass="css_style": permits to change the CSS class associated to the second part of the text (default is collapsedtextbody).

AuthorsStéphane GALLAND
Licenses
Operating SystemsOS Independent
ImplementationPHP

RssRecent releases

PackageVersion
CollapsableText1.0

No-screenshot

Project Spotlight

TeX-UPmethodology

A LaTeX style which permits to create Unified Process methodology (UP or RUP) based documents (document version, history, authors, validators, specification, task management, helping tools...).

No-screenshot

Project Spotlight

tinyMAS

A very small platform which permits to implement and run agent-based systems.