New Plugin; spoiler alert
Hello everyone;
I've written a plugin for learning, and well, I like posting jokes and this helps to hide the punchlines.
Note, I've removed the php start and end tags, and the cvs id line is fake as this hasn't been checked in anywhere, plus I put an extra carriage return in the $ret line (between the two table rows) to avoid creating an overly wide post.
I'm plopping this here, just in case someone else thinks having black text in a black background could come in handy. Users that want to see the spoiler only need to mouse highlight the area to see the text. This is an idea lifted from a BBCode forum I hang out on.
Put it in lib/wiki-plugins/wikiplugin_spoiler.php (after adding the php tags and getting rid of the extra carriage return) to try it out.
Feel free to critique ruthlessly, as this is my practice version, and I'd prefer to learn good Tiki Technique sooner rather than later.
Cheers,
Brian
// $Id: /cvsroot/tikiwiki/tiki/lib/wiki-plugins/wikiplugin_spoiler.php,v 1.0 2008-11-10 22:58:00 btiffin Exp $ // Wiki plugin to output a hidden spoiler section // - btiffin function wikiplugin_spoiler_help() { return tra("Displays text in a spoiler section.").":{SPOILER(title=>Title)}text{SPOILER}"; } function wikiplugin_spoiler($data,$params) { extract($params, EXTR_SKIP); if(!isset($title)) { $title = 'Spoiler:'; } $ret = "$title $data"; return $ret; }