RationalWiki:Collapsible Comment System
The collapsible comment system is a series of templates designed for adding commentary to text that is too long to be amenable to the side by side system, or in which commentary is too sparse to make a side by side document interesting. It consists of bodies of commentary that are initially collapsed to preserve as much readability in the original text as possible. The comments can be expanded to be read, and can be linked to from within the main text using a variety of link templates.
We don't really use this system anymore as such use sparingly.
Creating a collapsed comment[edit]
A comment is created by using the CollapseComment template. This template has three parameters, firstly a title for the comment. This can be any text, but should be limited to a single line. This will always be displayed. The second parameter is an anchor name by which the comment can be referred to for linking purposes. This should be all one word, with no whitepace. However, underscores can be used instead of spaces to make them more human readable (e.g. why_nobody_can_beat_me_at_mornington_crescent is a valid anchor name.) The third and final parameter is the comment text itself. If you wish to write more than one paragraph, use paragraph tags (i.e. <p>
and </p>
) as you would with the {{cquote}}
.
For example, the declaration: {{CollapseComment|This is a collapsed comment|this_is_a_collapsed_comment|Hello, collapsed comment world.}}
produces the following output:
Linking to collapsed comments[edit]
There are a number of templates available to link to collapsed comments in various styles.
Strike through and link[edit]
The strike through and link template, StrikeLink lets you strike through egregiously wrong text and link it to commentary explaining why it is garbage. For example:
There have been many presidents of the United States throughout history. William Jefferson Clinton was the forty-second president of the United States. No Jedi has yet been elected president.
As if a liberal could ever be president! |
Pah! Everyone knows no true American would ever vote for a liberal, so therefore Bill Clinton could never ever have been president. |
This template takes two parameters, the first is an anchor name that refers to a collapsed comment (see above) and the second is the text to strike though and link.
Inline snark link[edit]
The InlineSnarkLink, as its name suggests, lets you add inline snark that links to a larger explanatory comment. For example:
Mornington Crescent is a game played on the BBC Radio Four panel game, I'm Sorry I Haven't a Clue. It has been suggested that in fact this game has no rules, but is made up as the players go along. [The fool! How can he be so ignorant of the glorious game?]
In fact the rules of Mornington Crescent are quite self explanatory |
Mornington Crescent is an ancient and complex game whose origins are shrouded both in mystery and history. Although no-one can say for definite when the game was first played, something very much like it was being enjoyed by the Romans before the invasion of Britain in 43 AD. When the Romans left Britain, the game continued to be played, although those who played ran the risk of being labelled as Roman collaborators. Thus any mention of Romans or the game's Latin name had to be discarded. Thus, by a linguistic process too complicated for an Entry such as this, the name of the game evolved over the centuries into 'Mornington Crescent'. By the time of the Battle of Hastings, Mornington Crescent had become popular with French nobility, who were amazed to find the game played in England. The subsequent publication of the Domesday Book was invaluable to the French invaders wishing to brush up on the rudiments of the game. |
Again, this template takes two parameters. The first is the anchor name of the comment to link to, and the second is the snark text.
Types[edit]
{{CollapseComment}}
{{Help01}}
{{InlineSnarkLink}}
{{StrikeLink}}
Add more![edit]
And what list would be complete without this Schlaflyism? I'm sure there are other styles of link that could be useful. Creating a link is as simple as [[#anchor_name|link text]]
.
Compatibility[edit]
Works in:
- Internet Explorer
- Chrome
- Edge
- Firefox
- Safari (iOS)
Does not work in:
- Opera mini
Help wanted[edit]
- If you can make any of this prettier, less obtrusive, etc. then be my guest. Replacing the word "Commentary" with an appropriate image might be a good start.
- I checked the javascript worked in IE, and noticed the boxes don't look too brilliant in versions that didn't support PNG transparency. Get a better browser. However, if you do care please to be fixing it.
- Make sure the javascript works in Opera, Safari (Mac).
- If the javascript breaks, please complain to RationalWiki:Technical support.
See also[edit]