Extension:Collapsmi
|
Collapsmi Release status: stable |
|||
|---|---|---|---|
| Implementation | Tag | ||
| Description | Enables collapsing and expanding content. a.k.a. Show/Hide | ||
| Author(s) | Sami Islam (SamiIslamTalk) | ||
| Last version | 1.0.0 (23.11.2011) | ||
| MediaWiki | 1.16.2 | ||
| PHP | 5.3.6 | ||
| Database changes | no | ||
| License | GNU General Public License version 3.0 | ||
| Download | |||
|
|||
|
|||
|
Check usage (experimental) |
|||
Contents |
[edit] What can this extension do?
Collapsmi allows collapsing and expanding some content which can either be simple text, wiki markup or even a web-site.
It only has a handful of attributes some of which can be combined.
The usage section below lists the attributes and the default and possible values.
The pictures below show the wiki syntax and what the tags look like.
[edit] Tested using
| Product | Version |
|---|---|
| MediaWiki | 1.16.2 |
| PHP | 5.3.6 (apache2handler) |
| Opera | 11.5.2 |
| Firefox | 7.0.1 |
| Internet Explorer | 9.0.8112.16421 |
[edit] Usage
There are only a handful of attributes of the tag:
| Attribute | Default value | Possible values | Meaning |
|---|---|---|---|
| UniqueId | autogenerated | Any value of e.g. '1', 'one', '1one' | Uniquely identifies a tag on a page |
| BackgroundColor | #FFFFCC | Any valid html color code | The background colour for the tag content |
| CollapseText | 'Collapse' or 'Collapse All' or 'Collapse specific tags' | Any text | The text to show for the collapse label |
| ExpandText | 'Expand' or 'Expand All' or 'Expand specific tags' | Any text | The text to show for the expand label |
| ExpandByDefault | true | 'true' or 'false' | Should the content for a tag be expanded by default? |
| toggle | false | 'all', a string with a list of unique ids in the format: 'uniqueId1;uniqueId2;uniqueId3;...' | This attribute can either toggle all tags or specific tags BUT NO tag with this attribute |
| url | false | Any valid url | The url to show as the content of a tag |
| urlheight | 500 | Any valid number as text e.g. '500' | The height of the url to show as the content of a tag. This can only be used in conjunction to the url attribute. |
[edit] Examples
The following screen shots show the wiki syntax and its result:

[edit] Installation
To install this extension add the following to LocalSettings.php:
require_once( "$IP/extensions/Collapsmi/Collapsmi.php" );
Copy the files Collapsmi.php, Collapsmi.i18n.php and Collapsmi.body.php under the Mediawiki extensions folder for Collapsmi (/extensions/Collapsmi/).
[edit] Collapsmi code
Please use the download link above to get the code.
[edit] To discuss new ideas or changes
Please use the Discussion page to discuss new ideas or changes.
