MyBB Community Forums

Full Version: Custom Image Spoiler
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone, i have been searching a vbulletin style spoiler but have no success.
So here is what i'm trying to find:
the mycode should look like this:
[spoiler=[img]your link to image anywhere in the web[img]]Hidden text or additional spoiler or superspoiler[/spoiler]

So, this spoiler must have a use of img mycode inside of it. Need it badly.
You can view such spoiler over here --->
Here the H&F Group image is a spoiler actualy, contains two another img spoilers.
My own thread on that forum also uses this superspoiler
But mine is too complicated in structure:
an so on...

So anyone implemented this, dude you will have good karma, and many thanks from me. )

After few hours of learning mycode creation and othe stuff i did it!

Title: Image Spoiler

Short Desc.: Spoiler to use your own images as spoiler, not using pre uploaded images.


<div><div><input name="spoiler" type="image" src="$1" 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 = '$1'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; }">
<div style="margin: 0px; padding:0px;">
<div style="display: none;">

The usage is:
[imgsp="urltojpg\png\gif or anyother image on the web"]Hidden text here[/imgsp]

Anyone to update this code alongside security terms are welcome! )
Many thanks goes to mybbsource for awesome faq)