The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
3 posters

    LGBB of the original Spoiler TAG

    avatar
    Codi
    Forumember


    Male Posts : 30
    Reputation : 2
    Language : English
    Location : Manaus, Brazil

    Solved LGBB of the original Spoiler TAG

    Post by Codi Fri 5 Oct 2012 - 8:15

    I am creating a personalized BBCode tag with a different display for the Spoiler preset. I need the original java code with the html that is parsed in the default code, so that I can make my changes, please.

    (the original LGBB, it should start like this:
    Code:
    LGBB.add('bspoiler', {
      close: true,
      defaultAttr : 'Spoiler',
      replacement:

    etc.)
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: LGBB of the original Spoiler TAG

    Post by LGforum Fri 5 Oct 2012 - 22:31

    This is the HTML of the default spoiler on phpbb3:
    Code:
    <dl class="codebox spoiler"><dt style="cursor: pointer;">Spoiler:</dt><dd><div class="spoiler_content hidden">CONTENT IN SPOILER</div></dd></dl>

    If your making a new spoiler tag, LGBB already offers one.
    If not, what type of BBcode are you making?
    avatar
    Codi
    Forumember


    Male Posts : 30
    Reputation : 2
    Language : English
    Location : Manaus, Brazil

    Solved Re: LGBB of the original Spoiler TAG

    Post by Codi Fri 5 Oct 2012 - 23:41

    @LG forum
    I want it to look exactly like the default spoiler that's in use in my forum, I just want to change the default ATTR word and very few details in the "replacement" section.

    I don't want the HTML itself, that I could get just by seeing the page in html... I'm interested in the java code WITH the html, located in the "replacement" value in the file that looks like the code I pasted from avacweb up there in my previous post.

    @Rideem
    I asked here cause I figured it must be one of the codes you guys have in your Panel here.

    To rephrase what I need... let me try... I want to change how the SPOILER box behaves (not looks: that I know I can do with CSS) so I am creating a new spoiler bbcode, using the new LGBB code tutorial. Since I don't want to change much (just a few things), I want the default funtcion code of the Spoiler bbcode so that I man make my changes. I already know what needs to be changed and where, I just need the default function code for me to make my changes... I couldn't find it with firebug and I suppose it's nice and plain there along with the other default bbcode functions. Can you guys paste it here for me?
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: LGBB of the original Spoiler TAG

    Post by LGforum Sat 6 Oct 2012 - 0:48

    Oh so you mean, what LGBB Javascript would be needed to add the default spoiler? I can give you that and you can edit it to your liking.

    LGBB isn't used for every BBcode on Forumotion, they're all done server side as part of the forum software. LGBB just mimicks this behaviour, allowing us to create new Bbcodes.

    Code:
    LGBB.add('bspoiler', {
      close: true,
      defaultAttr : 'Spoiler',
      replacement: '<dl class="codebox spoiler"><dt style="cursor: pointer;" onclick="$(this.nextSibling.firstChild).toggle();">{ATTR}</dt><dd><div style="display:none" class="spoiler_content">{CONTENT}</div></dd></dl>'
    });
    That will create the same look of the default spoiler.
    avatar
    Codi
    Forumember


    Male Posts : 30
    Reputation : 2
    Language : English
    Location : Manaus, Brazil

    Solved Re: LGBB of the original Spoiler TAG

    Post by Codi Sat 6 Oct 2012 - 3:56

    Thank you guys SO much!

    I am having a lot of fun creating my own bbcodes for my forum!
    This topic can be marked as solved and blocked, but if I am not pushing my luck here, I'd like to know where I can read more about having more than one {ATTR} (variable attributes) in a bbcode function... I know it's possible because I've seen some bbcode tags that look like this: [tag=attr1,attr2], and I'd really lik to have that possibility.

    Thanks again! =DDD
    Jophy
    Jophy
    ForumGuru


    Male Posts : 17922
    Reputation : 836
    Language : English
    Location : Somewhere

    Solved Re: LGBB of the original Spoiler TAG

    Post by Jophy Sat 6 Oct 2012 - 12:39

    Topic Solved & Locked

      Current date/time is Mon 23 Sep 2024 - 10:31