Hello Rich,
sorry to bump this. because im still using 1.3. so i made a change about bbcode_extended.
i making this because the spoiler doesnt work. default installed just hiding a content below the 'spoiler' bar.
so this is my mood. this mod making animate to spoiler. and must have jquery extension. im using fancy_jquery.
( *please dont ask about coding. im just making a little mod and put some javascript from jquery. basicly im not coder, im just GUI designer )
At manifest.xml just adding spoiler.js below .css
<?xml version="1.0" encoding="utf-8"?>
<extension engine="1.0">
<id>bbcode_extended</id>
<title>BBCode Extended</title>
<version>0.1</version>
<description>This extension adds extra BBCode tags.</description>
<author>Rich Pedley</author>
<minversion>1.3</minversion>
<maxtestedon>1.3.4</maxtestedon>
<hooks>
<hook id="he_start"><![CDATA[
// Include language
if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'.php'))
require $ext_info['path'].'/lang/'.$forum_user['language'].'.php';
else
require $ext_info['path'].'/lang/English.php';
]]></hook>
<hook id="ps_do_bbcode_replace"><![CDATA[
// Include language
if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'.php'))
require $ext_info['path'].'/lang/'.$forum_user['language'].'.php';
else
require $ext_info['path'].'/lang/English.php';
//strikethrough
$pattern[] = '#\[s\](.*?)\[/s\]#s';
$replace[] = '<del>$1</del>';
//spoiler
$pattern[] = '#\[spoiler\](.*?)\[/spoiler\]#s';
$replace[] = '</p><div class="spoiler"><strong>'.$lang_bbcode_extended['Spoiler'].'</strong><div class="spoilContent">$1</div></div><p>';
]]></hook>
<hook id="ps_preparse_tags_start"><![CDATA[
$tags_block[]='spoiler';
]]></hook>
<hook id="ps_preparse_bbcode_start"><![CDATA[
//strike
$tags[] = 's';
$tags_opened[] = 's';
$tags_closed[] = 's';
$tags_inline[] = 's';
$tags_limit_bbcode['*'][] = 's';
$tags_limit_bbcode['url'][] = 's';
$tags_limit_bbcode['email'][] = 's';
$tags_fix[] = 's';
//spoiler
$tags[] = 'spoiler';
$tags_opened[] = 'spoiler';
$tags_closed[] = 'spoiler';
$tags_fix[] = 'spoiler';
]]></hook>
<hook id="he_new_bbcode_text_style"><![CDATA[
?>
<li>
<code>[s]<?php echo $lang_bbcode_extended['Deleted text'] ?>[/s]</code> <span><?php echo $lang_help['produces'] ?></span>
<samp><del><?php echo $lang_bbcode_extended['Deleted text'] ?></del></samp>
</li>
<li>
<code>[spoiler]<?php echo $lang_bbcode_extended['Spoiler'] ?>[/spoiler]</code> <span><?php echo $lang_help['produces'] ?></span>
<samp><div class="spoiler"><?php echo $lang_bbcode_extended['Spoiler'] ?></div></samp>
</li>
<?php
]]></hook>
<hook id="hd_head">
<![CDATA[
$forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
$forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';
]]>
</hook>
<hook id="hd_viewtopic_head">
<![CDATA[
$forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
$forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';
]]>
</hook>
<hook id="hd_post_head">
<![CDATA[
$forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
$forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';
]]>
</hook>
<hook id="hd_profile-signature_head">
<![CDATA[
$forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
$forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';
]]>
</hook>
<hook id="hd_postedit_head">
<![CDATA[
$forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
$forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';
]]>
</hook>
</hooks>
</extension>
CSS mod (bbcode_extended.css)
.spoiler>strong {
color:#fff;
background:#333;
padding:10px;
border-radius:4px;
display:block;
}
div.spoiler{
color:#333;
background:#e5e5e5;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding:10px;
border-radius:6px;
}
.spoilContent {
display:none;
}
and here's spoiler.js
// JavaScript Document
$(document).ready(function(){
$.each($('.spoiler'), function(){
$(this).click(function(){
$(this).find('.spoilContent').toggle('normal', 'linear');
});
});
});