1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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

Discussion in 'Add-on Requests [Archive]' started by CyberAP, Oct 7, 2010.

  1. CyberAP

    CyberAP Well-Known Member

    I think you know what I'm talknig about.
    Spoiler hides info into one line (block)
    Anything here
  2. Brogan

    Brogan XenForo Moderator Staff Member

    I use a button for my spoiler like so:

    <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
    Rufiq likes this.
  3. Jeremy

    Jeremy Well-Known Member

    Wait, XenForo doesn't have custom BBCodes?
  4. Jeremy

    Jeremy Well-Known Member

    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. :)
  5. Jeremy

    Jeremy Well-Known Member

    Do you have the .spoiler class for your code Brogan?
  6. anotheralias

    anotheralias Well-Known Member

    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?
  7. Jeremy

    Jeremy Well-Known Member

    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.
  8. EQnoble

    EQnoble Well-Known Member

    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.
  9. Jeremy

    Jeremy Well-Known Member

    EQnoble, if you'd like, send me the code and I will get it into my release. Brogan's is (no offense), extremely plain.
  10. Brogan

    Brogan XenForo Moderator Staff Member

    .spoiler class?
    Can you explain?

    Oh right, gotcha.
    All you need is the code posted.
  11. Jeremy

    Jeremy Well-Known Member

    Well, once I get 1-2 more bbcodes working, I'll release this. Currently, [user][/user] is giving me trouble.
  12. Jeremy

    Jeremy Well-Known Member

  13. EQnoble

    EQnoble Well-Known Member

    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

    I broke it this is the best example I could manifest for the time being.
  14. yavuz

    yavuz Well-Known Member

    I'm using this one on my vB board for a while. Maybe It can be used to build one for XF.

Share This Page