• Before posting a question, please check our Frequently Asked Questions page as well as previous threads here. Odds are you aren't the first to ask, and you may find the answer without having to post!

Weird Accordion Stuff

It doesn't seem that bad the second time around. The mass breaking most likely happens when you try to put other stuff after the accordion coding.
 
It had nothing to do with the accordion coding, rather, it had to do with your background coding. You did not place the tags in the correct order. Your coding should be the following.

Code:
[border=1px #f4f4f4 solid][accordion]{Slide=[bg=#f4f4f4]LOREM IPSUM}[bg=#f4f4f4]lorem ipsum[/bg]{/Slide}[/bg][/accordion][/border]

LOREM IPSUM
lorem ipsum



 
Allow me to elaborate on this further. In your original coding, the closing background tag was after you had defined your slide.

Code:
{Slide=[bg=#f4f4f4]LOREM IPSUM}[bg=#f4f4f4]lorem ipsum[/bg][/bg]

This caused the forum system to think that there was a missing background tag in the content of the slide. Because of that, it caused the page to break.


 
After messing around with this more with @The Dark Wizard, I learned that this issue is only repeatable with the accordion tag. The reason being is because the accordion is the only BBCode that allows you to format the variable (the slide). I tried using the tabs tag, but it won't replicate our issue because the tabs coding isn't formattable. With the tabs coding, you can only format the content inside the tabs coding.

Code:
[tabs][tab=I cannot be formatted]But I can[/tab][/tabs]




Since users are allowed to format what the accordion looks like, this is where our page break comes in.

Code:
[accordion]{slide=I can be formatted!}And so can I{/slide}[/accordion]

I can be formatted!
And so can I



When a user is defining the slide, it is like coding on a completely separate document. Because you placed the closing background tab outside of the slide variable, the forum system got confused. Other page breaks can be created using the background coding, but not in the same way as this. Wiz said that, since the flexibility of the slide variable is what makes the code worth what it is, he will not be 'fixing' anything.


I hope this has given some insight to your issue. Always be careful when organizing your opening and closing tabs. It's an issue that many users run into and forget to check.
 
Okay, so just to be sure I understand all of this (just woke up not too long ago so my brain is still foggy):


The entire issue was where the [/bg] was placed, yes? It must be placed BEFORE and AFTER {/Slide} if you want both slide and content to have a background and not break the page.



If the case is opening and closing codes and placements, then I understand there's nothing to be fixed.
xD


I think our concern was, we weren't quite sure if it was an entire code break or if it was something we were doing wrong.
 
[QUOTE="Yuuki of the Strata]
Okay, so just to be sure I understand all of this (just woke up not too long ago so my brain is still foggy):
The entire issue was where the [/bg] was placed, yes? It must be placed BEFORE and AFTER {/Slide} if you want both slide and content to have a background and not break the page.



If the case is opening and closing codes and placements, then I understand there's nothing to be fixed.
xD


I think our concern was, we weren't quite sure if it was an entire code break or if it was something we were doing wrong.


[/QUOTE]
Your understanding is correct. However, with this coding, there shouldn't be an issue like this happening. The forum system on this site can be very smart and will often times place closing tags where there needs to be a closing tab in order for it to properly function. In this case, with the misplacement of the closing background tag, the forum system did not place the closing tag where it needed to go because it was still able to function. Had the closing tag not been present at all, the forum system would have likely done something different. (I'm not positively sure exactly what it would do since I have not tested it but I can do so if you wish).
 
I have found that the system likes to duplicate coding sometimes when there is a closing tag missing. After the missing closing tag, it will start duplicating the entire broken tag in various places. I guess it all depends on what kind of tag it is and if it can/can't function without it.


Anyways, thank you very much. Now we don't have to break the forums.
xD
 
Sweet Jesus! Thanks for the help! xD Least now I know where to properly close them in order for that coding to work. =w= /
 

Users who are viewing this thread

Back
Top