the version require php processing
PHP Code:
// [SPOILER]
$tag_list['no_option']['spoiler'] = array(
'callback' => 'handle_bbcode_spoiler',
'strip_empty' => true,
'strip_space_after' => 1
);
// [SPOILER=XXX]
$tag_list['option']['spoiler'] = array(
'callback' => 'handle_bbcode_spoiler',
'strip_empty' => true,
'strip_space_after' => 1,
'parse_option' => true
);
this one uses the bbcode_fetch_tags plugin
but i still need to find the hook for the function
PHP Code:
/**
* Handles a [spoiler] tag. Displays a string in an area indicating it was a spoiler.
*
* @param string The body of the quote.
* @param string If tag has option, then a reason is present.
*
* @return string HTML representation of the tag.
*/
function handle_bbcode_spoiler($message, $reason = '')
{
global $vbulletin, $vbphrase, $stylevar, $show;
// remove smilies from username
$reason = $this->strip_smilies($reason);
$show['reason'] = ($username != '') ? TRUE : FALSE);
$message = $this->strip_front_back_whitespace($message, 1);
if ($this->options['cachable'] == false)
{
$show['iewidthfix'] = (is_browser('ie') AND !(is_browser('ie', 6)));
}
else
{
// this post may be cached, so we can't allow this "fix" to be included in that cache
$show['iewidthfix'] = false;
}
$template = 'bbcode_spoiler';
eval('$html = "' . fetch_template($template) . '";');
return $html;
}