Extension:Expandable tables

This extension is a single snippet of code to be included in your LocalSettings.php script, it's only been tested on version 1.6.7. It allows expandable/collapsable tables to be created by giving them a class attribute of "expandable", and a title attribute. If an id attribute is included and set to 1, the table will be expanded by default.

Bugs & warnings

 * It doesn't currently work in page preview
 * The class and title attributes must be first

Code
I've included the code here since it's quite short, but it would be best to get it from MediaWiki expandable tables.php since it may be more up to date. $wgHooks['ParserAfterTidy'][] = 'allowExpandables'; function allowExpandables(&$parser,&$text) { if ($GLOBALS['allowex-done']++) return true; # Replace all the expandable tables with html containing CSS classes and the show/hide links $text = preg_replace_callback(		'/ ';	}
 * 1) Expandables