Advertisement:

Author Topic: Unreliable BBcode  (Read 1523 times)

Offline pokedwhenever

  • Semi-Newbie
  • *
  • Posts: 20
Unreliable BBcode
« on: April 29, 2012, 03:29:56 PM »
Whenever I try to use all the buttons to combine different BBcode formatting on the same text, the forum goes crazy.

For example...

Hello, I am pokedwhenever.

is a combination of the bbcode for color, size, center, and bold. However, If I use this exact code on my forums, some of the code won't show up and other parts of it will bunch up together with no spaces. Usually [size] and [/color] show up at the end randomly and nothing is the colored or sized the way it was supposed to be.

Any thoughts? This is a huge problem for me because our entire forum depends on coloring and resizing text. Any help would be great!

Online Colin

  • Customizer
  • SMF Hero
  • *
  • Posts: 4,792
  • Gender: Male
  • SMF Customizer
Re: Unreliable BBcode
« Reply #1 on: April 29, 2012, 03:47:37 PM »
Can you post the exact BBC code in the order you are using it on your forum when it doesn't work correctly.

Offline MrPhil

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,652
Re: Unreliable BBcode
« Reply #2 on: April 29, 2012, 05:02:58 PM »
Have you confirmed that the tags are always nesting properly, as in:
Code: [Select]
[center][color=orange][size=14pt][b]Hello, I am pokedwhenever.[/b][/size][/color][/center]
Check if maybe you're accidentally moving the cursor in between button pushes, and ending up with tags that aren't properly nested.

Do you have any modifications to your code that might change BBCode processing in Sources/Subs.php? Where do you see these unexpected extra tags like [size] and [/color]? Are they inserted by SMF somewhere else, or are they your original tags, but not being recognized? Is there any consistency in whether they work or not? You're sure that none of the text in-between (tag "content") contains its own tags (use the [nobbc] tag to suppress that)? Is this only happening when using the BBCode buttons, or does it also happen when you manually insert BBCode tags?
Please do not PM me with support questions, unless I ask you to. Unsolicited PMs for support will be ignored. It's best to have questions and answers in public, so others can research a problem and learn about it without having to ask the question yet again. Thank you!
FAQs | SMF 1.1 fixes | Project ideas
-= From the ashes shall rise a sooty tern =-

Offline pokedwhenever

  • Semi-Newbie
  • *
  • Posts: 20
Re: Unreliable BBcode
« Reply #3 on: April 29, 2012, 08:54:24 PM »
Yes the tags are fine. I've narrowed it down to a problem with WYSIWYG only. If I click toggle view, the bbcode is fine, but if I have it on WYSIWYG view and then submit or preview the post, all the formatting gets screwed up.

I will demonstrate the problem with this picture. The top half is the preview. The bottom half is the WYSIWYG view.

http://imgur.com/VsQmg [nofollow]

Offline pokedwhenever

  • Semi-Newbie
  • *
  • Posts: 20
Re: Unreliable BBcode
« Reply #4 on: April 29, 2012, 08:57:37 PM »
If I toggle view with the same text, I see this:

Code: [Select]
[size=large][color=rgb(0, 128, 0)][font=georgia]Hello I am pokedwhenever.[/font][/color][/size][font=arial]
[/color][color=orange][size=xx-large]I want to fix the bbcode problem.[/size][/color][color=rgb(0, 128, 0)][/font]

Offline pokedwhenever

  • Semi-Newbie
  • *
  • Posts: 20
Re: Unreliable BBcode
« Reply #5 on: April 29, 2012, 09:03:45 PM »
I just tried the same thing on these forums, and the same problem occurs. Can it not be fixed? It seems to be a problem with how the mode inherently works.

Offline MrPhil

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,652
Re: Unreliable BBcode
« Reply #6 on: April 30, 2012, 10:51:14 AM »
Well, the BBCode tags are definitely all screwed up. There is an extra [/color] in the middle, as well as an extra [color=rgb(0, 128, 0)]  tag at the end. Was all of this created by the BBCode buttons, without any editing by hand?

What it should be:
Code: [Select]
[size=large][color=rgb(0, 128, 0)][font=georgia]Hello I am pokedwhenever.[/font][/color][/size]
[font=arial][color=orange][size=xx-large]I want to fix the bbcode problem.[/size][/color][/font]
Hello I am pokedwhenever.
I want to fix the bbcode problem.

Created using the editor here in non-WYSIWYG mode:
Hello I am pokedwhenever.
I want to fix the bbcode problem.

Created in WYSIWYG mode:
Hello I am pokedwhenever.
[/color]I want to fix the bbcode problem.

I wonder why I don't get the same tag attributes as you do (I'm using the font face, size, and color pulldowns). Perhaps you have some BBCode-related mods installed?

Hmm. Yes, there is definitely a problem in the vanilla WYSIWYG editor. It adds all sorts of extra tags. Frankly, I never use the thing in that mode (I either type in the tags myself or highlight/press a button, and then preview). I had to go back and fix the non-WYSIWYG version after I used WYSIWYG. Perhaps you should open a bug report? Please first look to see if it's been reported already, and add your comments to the existing report.
Please do not PM me with support questions, unless I ask you to. Unsolicited PMs for support will be ignored. It's best to have questions and answers in public, so others can research a problem and learn about it without having to ask the question yet again. Thank you!
FAQs | SMF 1.1 fixes | Project ideas
-= From the ashes shall rise a sooty tern =-

Offline vaelek1

  • Newbie
  • *
  • Posts: 4
Re: Unreliable BBcode
« Reply #7 on: September 12, 2012, 09:03:50 PM »
I am having this same issue. Was a solution ever found? I'm on 2.0.2 and purchased another editor solely to get around the total unusability of the built in editor. It also chokes when pasting text that looks just fine in the editor but goes to hell when posted or previewed.

Offline Kill Em All

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,074
  • Gender: Male
  • Something has to go wrong. Just has to.
    • KEAGaming
Re: Unreliable BBcode
« Reply #8 on: September 12, 2012, 11:05:03 PM »
I assume you are using the WYSIWYG editor? Define chokes... what shows up exactly when you post?
My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Offline vaelek1

  • Newbie
  • *
  • Posts: 4
Re: Unreliable BBcode
« Reply #9 on: September 13, 2012, 08:33:37 AM »
I assume you are using the WYSIWYG editor? Define chokes... what shows up exactly when you post?

WYSIWYG yes. It does the same thing as mentioned by MrPhil. Color and Size tags spread through the post. If I write it in bbcode mode, it's fine. If I write in WYSIWYG and preview, I get the tags showing up in the post. If I modify an existing post, I get the tags showing up. The size tags always have a % for the value when this happens.

Offline kingW3

  • Semi-Newbie
  • *
  • Posts: 92
Re: Unreliable BBcode
« Reply #10 on: September 13, 2012, 12:21:27 PM »
What i noticed so far that tags needs to be close only once like this [b][code][/b] also the toggle view button sometimes doesn't close tags and for other problems they don't seem to appear to my forum and my friends forum