The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
BBCode - Custom Spoiler Details »» | |||||||||||||||||||||||||||||
*Update released! In the new code the button will automatically adjust it's width to tightly fit all the text in the title.. You don't have to worry about keeping your title small anymore! enjoy!
If you like this you may also like the image preview spoiler for large images I have seen spoiler code before but I am not sure if there is any spoiler code 4.0 for a custom spoiler where you can enter the text that appear on the button (ex. Click to view hidden message) and also show what is on the inside... Here is my code I made: ** There is a known glitch where in the button title if you put the following symbol in the name ' then it will not work... If anyone can fix this please let me know because I have tried.. Other than that, the code works fine! Enjoy! (Screenshots below) Title: Code:
Spoiler Code:
spoiler Code:
<div> <div class="pre-spoiler"> <input type="button" value=" {option} " style="font-size:14px;margin:0px;padding:0px;" 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.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = '{option}';}"> </div> <div> <div class="spoiler" style="display: none;"><div style="border: 1px solid ;">{param}</div></div> </div> </div> Code:
[spoiler=enter your title here]enter your text here[/spoiler] Code:
Shows and hides text with the click of a button. (Glitch: In the button title... do not use this symbol ' ) Code:
Yes. Screenshots
Show Your Support
|
Comments |
#12
|
|||
|
|||
OH!!! Okay!
Here is the new replacement code (150px also...) All you need to do is edit the code where it says "***URL HERE***" and change it to the full URL of the image. Replacement: Code:
<div> <div class="pre-spoiler"> <button style="background-image:url(***URL HERE***);width:150px;font-size:14px;margin:0px;padding:0px;" 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.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = '{option}';}">{option}</button> </div> <div> <div class="spoiler" style="display: none;"><div style="border: 1px solid ;">{param}</div></div> </div> </div> |
#13
|
|||
|
|||
Hmm, it displays an image, but when i click on expand colapse, it gives me this message
Vbulletin message "Invalid Action Specified" And the spoiler image goes over the spoiler text... :/ |
#14
|
|||
|
|||
Hmm.. Give me some time, I fear I will have to use the Z-Index to make the text be ontop.. I hate the Z-index haha..
Also.. I do not know what the error is... I will take a look at it later.. I have to go now.. Please hold |
#15
|
|||
|
|||
OKy dude, and i have to sleep now, its 5am here.. :/ i will respond tomorrow, and once again, thank you so much for you'r help, you are the best..
Anti Out! xD |
#16
|
|||
|
|||
Fixed it!
Same thing.. replace the ***URL HERE*** (You will have to scroll over in the code box below to find it) This will work! new Replacement code: Code:
<div> <div class="pre-spoiler"> <input type="button" value="{option}" style="width:150px;font-size:14px;margin:0px;padding:0px;background-image:url(***URL HERE***)" 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.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.value = '{option}';}"> </div> <div> <div class="spoiler" style="display: none;"><div style="border: 1px solid ;">{param}</div></div> </div> </div> |
#17
|
|||
|
|||
Yeap, this works, but the image isn't aligned in the field, it's way off.. And the image is the same size 150px.. How can i center the image in the field.. i tried with some positioning, but it doesnt work.. :/ Once again THANK YOU!
|
#18
|
|||
|
|||
Installed using original code (image not needed for me).
Would like to see the symbol ' glitch fixed though 4.1 PL2 |
#19
|
|||
|
|||
I figured it out, anyway, dunno what it is, but if you have an image lets say 150x30, the spoiler width and height must me smaller than the image size, for example 145x26, and then everthing is centered.. But if you put it in the same size, it wont be..
Thanks again for you'r help dude.. Best Regards, Antidepresiv |
#20
|
|||
|
|||
I think that's because the image was probably a rectangle and the button is a curved rectangle so the curves extend past the px size... Anyways, glad you go it working!
Wish you the best! |
#21
|
||||
|
||||
do you also have strike through ? thanks
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|