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.

LGBB of the original Spoiler TAG

3 posters

Go down

Solved LGBB of the original Spoiler TAG

Post by Codi October 5th 2012, 8:15 am

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.)
avatar
Codi
Forumember

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

Back to top Go down

Solved Re: LGBB of the original Spoiler TAG

Post by LGforum October 5th 2012, 10:31 pm

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?
LGforum
LGforum
Hyperactive

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

Back to top Go down

Solved Re: LGBB of the original Spoiler TAG

Post by Codi October 5th 2012, 11:41 pm

@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?
avatar
Codi
Forumember

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

Back to top Go down

Solved Re: LGBB of the original Spoiler TAG

Post by LGforum October 6th 2012, 12:48 am

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.
LGforum
LGforum
Hyperactive

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

Back to top Go down

Solved Re: LGBB of the original Spoiler TAG

Post by Codi October 6th 2012, 3:56 am

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
avatar
Codi
Forumember

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

Back to top Go down

Solved Re: LGBB of the original Spoiler TAG

Post by Jophy October 6th 2012, 12:39 pm

Topic Solved & Locked
Jophy
Jophy
ForumGuru

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

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum