Extension:CollapsableText
From MediaWiki.org
|
CollapsableText Release status: stable |
|
|---|---|
| Implementation | Tag |
| Description | Adds a table to easily hide/show portions of text |
| Author(s) | Stéphane GALLAND (sgalland-arakhneTalk) |
| Last version | 1.0 |
| License | GPL |
| Download | http://www.arakhne.org/mediawiki/CollapsableText/ |
|
Check usage (experimental) |
|
Contents |
[edit] Description
CollapsableText is an extension of Mediawiki to create automatically portions of text which are collapsable.
[edit] Installation
- Download CollapsableText,
- Unpack the archive in your Mediawiki directory
- add require_once('extensions/CollapsableText/CollapsableText.php'); in your LocalSettings.php.
- 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/:- on Unix operating systems (including MacOS X):
$> ln -s /path/to/mediawiki/extensions/CollapsableText/public /path/to/apache/document/root/wiki/extensions/CollapsableText - on other operating systems (including Windows®): copy the content of
/path/to/mediawiki/extensions/CollapsableText/publicinto/path/to/apache/document/root/wiki/extensions/CollapsableText
- on Unix operating systems (including MacOS X):
- Icons used by this extensions should be accessible from the web client navigator. Icons are inside the directory
[edit] Usage
[edit] 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 could be invisible. The rules to detect both parts are (in preferred order):
- The first occurrence of the tag <collapsetext/> is the limit between the two parts.
Example: <collapsetext>ABC. DEF.<collapse>GHI.</collapsetext> - The first part is enclosed by braces.
Example: <collapsetext>{ABC. DEF.} GHI.</collapsetext> - The first part is the first sentence (first occurrence of the point).
Example: <collapsetext>ABC. DEF. GHI.</collapsetext>
[edit] Tag Parameters
Tag <collapsetext/> accepts parameters:
show="true"orshow="false": permits to force the visibility flag when showing up the page (default isfalse);titleclass="css_style": permits to change the CSS class associated to the first part of the text (default iscollapsedtexttitle);bodyclass="css_style": permits to change the CSS class associated to the second part of the text (default iscollapsedtextbody).
