![]() |
Classic button 'Spoiler' BB Code (NO INSTALL REQUIRED)
1 Attachment(s)
This is a classic button spoiler BB Code.
Title: Spoiler BB Code Tag Name: Spoiler Replacement: Code:
<div style="margin: 5px 20px 20px;"> <div class="smallfont" style="margin-bottom: 2px;"><b>Spoiler:</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" 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.innerText = ''; this.value = 'Show'; }" type="button" /> </div> <div class="alt2" style="border: 1px inset ; margin: 0px; padding: 6px;"> <div style="display: none;"> {param} </div> </div> </div> Description: Allows you to hide text or images. Image Path: Choose an image and upload it to your server. Use {option}: No Remove Tag If Empty: Yes Disable BB Code Within This BB Code: No Disable Smilies Within This BB Code: No Disable Word Wrapping Within This BB Code: No Disable Automatic Link Parsing Within This BB Code: No Preview: https://vborg.vbsupport.ru/external/2012/10/2.png |
Installed, working, thanks.
But I could not get idea where we can use it? Hiding text with a show button, I think, it may be used to show the answer of a question after guess? |
Quote:
|
What is this button.?
https://vborg.vbsupport.ru/external/2012/12/21.png Isn't there supposed to be a image/button like the preview that says "Show" ? *edit* Nvm that is the button for when you're making a post. I used this one.. https://vborg.vbsupport.ru/external/2012/12/4.gif |
Error in mobile version vb 4.2 can't show the spoiler content / can't unhide...
|
Quote:
|
Quote:
|
works like a charm, thanks mate :)
|
No problem :)
|
I tried this code, but it seems there is something not correct. Everything is ok except that the button "show" when clicked nothing shows up. I mean spoiler is used to hide/show some text, right! so why this code doesn't do this job then!! or maybe I'm missing something here. please correct me if I'm wrong.
By the way, I did all exact steps many times, but still the hide/show function doesn't work... any idea? |
This is something strange I just noticed. I placed the code in a plain html page to test it, and surprisingly it works fine without any issues. However, when I apply the same code to my vb bbcode, the show/hide button doesn't function...........
what do you think, mates? |
hmm, I haven't experienced any issues with the code myself so I am just trying to think of why it wouldn't be working.
|
Hi Fatal Hazard,
Thanks for the efforts on this mod. This is just a quick feedback about what's going on. I have two sites with different forums, so one in English and other one is non-English so the English one is fine with this mod and works great. However, the "Arabic" one is not functioning at the property "show/hide".... possibly there is something related to the language !!! any idea? Thanks in advance Quote:
|
Hi, thanks for pointing this out. This may sound a bit weird but first have you tried editing the show and spoiler text in English to Arabic? This may be worth a try in the first instance.
If you haven't already, find: Code:
2px;"><b>Spoiler:</b> <input value="Show" Code:
''show" Code:
Spoiler: |
Thanks @Fatal Hazard, for the infor. However, after many tries it didn't work. possibly there is something not correct. I tried also adding other bbcodes like Blink and didn't work on the Arabic forum. I will create a new version of Arabic version and add the Spoiler BBcode and see how things go. I will update the issue with the results.
Thanks. |
Hi again, it is me....
I just installed new Arabic version with the same code, and guess what! it works great. I believe there is something wrong with my current forum so I guess I need to replace it. Thanks the code works perfect. Cheers |
Quote:
|
Quote:
|
when installed this spoiler why in the mobile not working ??
any suggestion ? |
works well, but only with text, the images can't be hidden! dont work with images :(
|
Installed, works awesome, much better than those spoiler scripts. 5 star vote.
|
Quote:
|
working great with my vb4.2.1 (text and image)
marked as installed Thanks so much |
Quote:
Great to hear :) It should also work with videos :) |
How can I make it so the spoiler is viewable to members only?
|
Quote:
|
not working in mobile style ..
|
Quote:
|
Quote:
|
It does not work on mobile style, can you do something?
And one question, do you know how to do if you want to make appear the spoiler in the user activity box? https://vborg.vbsupport.ru/showthrea...24#post2477524 |
um pretty sure this is the one i installed, lol, but just to verify it works for vb5.0.5 and also no issues with mobile browsing(didnt setup app yet)
im sure its beyond a simple bbcode add, but ideally id like to be able to put usergroup permissions on these tags |
Thanks for posting this mod, works great on VB4.
|
Quote:
|
Thank you! Finally a spoiler BBcode that functions properly on install.
|
work great on my site since 2013 til today
http://www.jokergameth.com |
All times are GMT. The time now is 05:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|