MyBB Community Forums

Full Version: Spoiler Image Button [spoiler]waa![/spoiler]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I was making a spoiler mycode like Spoiler (Click To View) for a friends forum and when i wasn't successful i started experimenting and made this mycode which uses images for the buttons =]

Title:
Spoiler Image

Short Description:
Image Spoiler - By CyberHackers.org

Regular Expression:
\[spoiler\](.*?)\[/spoiler\]

Replacement:
<div><div><input name="spoiler" type="image" src="http://i42.tinypic.com/nmkz6w.jpg" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.src = 'http://i40.tinypic.com/2m6347t.png'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.src = 'http://i42.tinypic.com/nmkz6w.jpg'; }">
</div>
<div style="margin: 0px; padding:0px;">
<div style="display: none;">
$1
</div>
</div>
</div>

Enabled:
Yes

Changing the images:
IMAGE - URL - COUNT(HOW MANY TIMES USED)
Show - http://i42.tinypic.com/nmkz6w.jpg - 2
Hide - http://i40.tinypic.com/2m6347t.png - 1

Spoilers will not work inside another spoiler.

Say thanks and if you use this give credits(to 88power88). =]

Btw yes i did accomplish in making the spoiler like this:
Spoiler (Click To View)
Just gonna make a simple php file to make it easier when changing the images...

Erm i think that's all.
ScreenShot:
[Image: 2rxfouo.jpg]
is this support multi spoiler ?
you mean spoiler inside spoiler or several spoilers in one post?
It doesn't support inside another spoiler but it does support more than one spoiler in the post Smile
can u make it multi spoiler(spoiler inside spoiler) ? will be nice
Yes i can try if i can find the reason why it wont work...
Good work. Spoilers are very useful when users post images.
multiple spoiler is bad.
but spoiler can work on multiple quote.
use that manual trick Wink LOL
(2010-04-25, 02:39 AM)FBI Wrote: [ -> ]multiple spoiler is bad.
but spoiler can work on multiple quote.
use that manual trick Wink LOL

What? Confused
thank u , it will be very useful for me
Cool script, but the images aren't very good :x
Pages: 1 2