loading to test
Announcement
Collapse
No announcement yet.
Spoiler BBCode
Collapse
This is a sticky topic.
X
X
-
- Top
- Translate
- Bottom
Comment
-
I spent several hours tinkering with a spoiler tag code last night, I'm not using yours currently but I'm curious to know how difficult it is to add the ability to change the text on the spoiler tag to a user-defined text?
[spoiler=example]spoiler here[/spoiler]
Would yield the word "spoiler" on the tag being replaced with "example" instead.
I've tried messing around with {param} and {option} but can't seem to get it functioning. x.x
-edit-
Just to be clear about the use for it and why I'd like to be able to do this. Other than hiding spoilers, we use an expandable/collapsable spoiler tag to condense longer posts and large images as well. It would be useful to name the spoiler tag with a brief description of the contents as opposed to having to type it out below it. I was on another website about 5 years ago that had this option, and it was pretty great.
- Top
- Translate
- Bottom
Comment
-
Do you want something like thisthat does exactly this kind of Spoiler BBCode? If so, here is the codeyou just have to replace "SPOILER" with {option} in the original replacement code in the first post and enable "Use {option}" setting. See the code below.
Read this important noteNote: If user doesn't provide the {option} text in the spoiler BBCode tag, then the spoiler will not be displayed and there is nothing to click to show it.HTML Code:<span style="cursor:pointer; border:1px solid red;padding:2px; color:red" onclick="this.nextSibling.style.display='';this.style.display='none'" title="Click to show content">{option}</span><span style="display:none; cursor:pointer; border:1px dotted #000; padding:2px" onclick="this.previousSibling.style.display='';this.style.display='none'" title="Click to hide content">{param}</span>
Last edited by glennrocksvb; 08-28-2018, 07:52 AM.
My Amazon Affiliate Link β
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
- Likes 1
Comment
-
Hi, I'm using vB 4.2.5
This works perfectly, however when there is no text above or below it.. it displays it as such:
Then if I add any text all at above the spoiler tags
Same applies to the bottom, so basically it works fine as long as there is text both above and below the tags
Any ideas on how to fix that?
- Top
- Translate
- Bottom
Comment
Latest Posts
Collapse
-
Reply to Welcome to our newest member issueby SnowhogWow! I totally forgot about this.

I just now edited the user.php file. We have a BANNED 'new' user showing in "Welcome to our newest...Today, 08:22 AM -
Reply to Request: Instagram Media Embed or Retrieval Mod for vBulletin Forums Using Snapinstaink Approachby glennrocksvbThank you for the suggestion. I took some time to evaluate the request further and review Instagram's Terms of Use.
I understand the use...Yesterday, 12:05 PM -
I am running a vBulletin forum for a content creator community and wanted to raise a mod request around Instagram media integration. Currently when members...Yesterday, 09:14 AM

Comment