• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[BB code] Spoiler

CyberAP

Well-known member
I think you know what I'm talknig about.
Spoiler hides info into one line (block)
Code
Anything here
 
I use a button for my spoiler like so:

Code:
[spoiler={TEXT1}]{TEXT2}[/spoiler]

Code:
<div class="spoiler"><div class="quotetitle"><input type="button" value="{TEXT1}" style="font-size:11px;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.innerText = ''; this.value = '{TEXT1}'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT2}</div></div></div>

Custom BB Code isn't yet possible but if someone could code that in it would be great.

Oh and fix the problem with not being able to use apostrophes in the {TEXT1} field :D
 
I'm now intrigued. I should stay away from XenForo, my productivity drops. I'll see if I can get a custom BBcode working later. :/ Should be able to figure it out. :)
 
Can I tag on a request for the other kind of spoiler code here too - the one that blacks out the text - or should I start a new thread for that?
 
I'm working on one that uses Brogan's code, but I hope to make it so that you can add your own via the control panel.
 
I have one that i've been waiting to work into XF...will try for tonight. Some one give me a desired default color for the spoiler to appear in. If not I will just use one of the default XF colors.
 
EQnoble, if you'd like, send me the code and I will get it into my release. Brogan's is (no offense), extremely plain.
 
Well, once I get 1-2 more bbcodes working, I'll release this. Currently, [user][/user] is giving me trouble.
 
EQnoble, if you'd like, send me the code and I will get it into my release. Brogan's is (no offense), extremely plain.
gimme another day if you can, long day and feel wrecked. I just need to fix a callback argument and some css and it should be all ready to go but I am too tired right this minute... I'll edit this post and update it

http://noobanomics.me
I broke it this is the best example I could manifest for the time being.
 
Top Bottom