this one is truly awesome.
i've managed to get it work by combining the next tips:
1) upload files per instructions but pay attention and upload images subfolders correctly to an active stlyle's image folder.
my example:
Code:
forum_root/images/avenger_blue
2) update / replace code provided by HoSStiA + modify a path of the style you're using (my example within the code). do this with the next steps:
a) open Plugin Manager and search for BBCode [spoiler]: button
b) click on edit and change the hook to editor_toolbar_start
c) replace the Plugin PHP Code with a new content:
d) replace the style location "$.../imgdir_editor/spoiler.gif"
Code:
if ($show['editor_toolbar'])
{
$imgdir_editor = vB_Template_Runtime::fetchStyleVar('imgdir_editor');
$vbulletin->bbcodecache[] = array(
'buttonimage' => "$avenger_blue/imgdir_editor/spoiler.gif",
'twoparams' => 0,
'bbcodetag' => 'spoiler',
'tag' => 'Spoiler',
'title' => 'Spoiler'
);
$vbulletin->bbcodecache[] = array(
'buttonimage' => "$avenger_blue/imgdir_editor/spoiler_a.gif",
'twoparams' => 1,
'bbcodetag' => 'spoiler',
'tag' => 'Spoiler +',
'title' => 'Spoiler +'
);
}
by now, the function should work fine manualy (with tags)
3) to enable button use fatal1980's tip by adding a custom BB Code. perform this with these steps:
a) AdminCP -> Custom BB Codes -> Add New BB Code
b) insert next values:
Title:
BB Code Tag Name:
(or whatever you want - i used spoiler)
Replacement:
Code:
<div class="spoiler">
<h2>Spoiler</h2>
<div class="hidden">{param}</div>
</div>
Example:
Code:
[spoiler]this is a test[/spoiler]
Button Image:
previously used image path (within the style's image subfolders). i use another image as the plus sign is not as clear in the meaning. my example:
everything should be working just fine now. you can play a bit more with the css to remove the bright backgrounds. to perform this follow the next step.
4) tweaking css
a) the easiest way to get to the proper css is to find it with the help of the search option
b) AdminCP -> Styles & Templates -> Search in Templates
c) use the search string
d) you should get a direct result = vsq_spoiler.css, double click it and edit per need
it works for me with VB 4.1.9
button:

working:
i hope it helps!
:up: