[/left] becoming [/center]

Discussion in 'Site Discussions & Suggestions' started by alidsl, Jul 4, 2010.

  1. alidsl
    OP

    alidsl I am now a lurker

    Member
    2,823
    279
    May 27, 2009
    Kanto - Pallet Town
    This has been a frequent problem when editing with quick edit on the Supercard plug-ins thread here

    I keep having to edit the post in the "a helpful word from Waffle" spoiler where [/left] becomes [/center]

    also at the end of the post the [/center] becomes

    can any of the admins find the problem and fix it please (It's a bit annoying)

    thanks in advance
     
  2. tj_cool

    tj_cool Site dev

    Supervisor
    9,993
    -1
    Jan 7, 2009
    Belgium
    This planet
    Why are you using [left] tags? Anything that's not in [center] or [right] tags will be aligned left by default...

    The problem seems to be that [/left], [/right], [/center] and [/spoiler] are all substituted by and the HTML parser can't handle it...
     
  3. alidsl
    OP

    alidsl I am now a lurker

    Member
    2,823
    279
    May 27, 2009
    Kanto - Pallet Town
    It's so I can have the spoiler title in the middle and the content on the left
     
  4. juggernaut911

    juggernaut911 GBAtemp Slut!

    Member
    4,153
    21
    Jul 13, 2006
    United States
    Warning: Spoilers inside!

    edit: nvm. doing so breaks the spoiler
     
  5. ProtoKun7

    ProtoKun7 GBAtemp Time Lord Regenerations: 3

    Global Moderator
    7,518
    1,558
    Jan 3, 2009
    Gallifrey
    TESTING...
     
  6. alidsl
    OP

    alidsl I am now a lurker

    Member
    2,823
    279
    May 27, 2009
    Kanto - Pallet Town
    Yeah that's how I've been doing it
     
  7. tj_cool

    tj_cool Site dev

    Supervisor
    9,993
    -1
    Jan 7, 2009
    Belgium
    This planet
    Seeing as I have this problem myself with 1 post, and I've seen some other people with this as well, I thought I'd bring this back up.

    I might have a solution to this though:
    The problem lies in the unparsing of the BBcode. Like I said above, the closing tags all get replaced by , making it very hard for the parser to see what is what.

    For example:
    Code:
    [center]{TEXT1}[/center]
    [left]{TEXT2}[/left]
    gets replaced with:
    HTML{TEXT1}
    {TEXT2}
    As you can see, the first parts give no problem as those are different. The last parts are the same, so they could be unparsed to the wrong BBcode tag.

    My suggestion is that we do it the IPB way, by doing it like this:
    HTML{TEXT1}--centero-->--centerc-->
    {TEXT2}--lefto-->--leftc-->
    Basically, the comments will be used as identifiers for the elements, which should lead to correct unparsing.
    It's the same as with with Quote (quoteo & quotec), and it seems to work, so why wouldn't this work? [​IMG]

    So, if an Admin/Super could make it like that for the tags that have as end, that would be great. [​IMG]
    I don't know what the problem with the anchors was, but if it was wrong unparsing, this system can probably work for those as well.
     
  8. tk_saturn

    tk_saturn GBAtemp Psycho!

    Member
    3,327
    14
    Jan 26, 2010
  9. tk_saturn

    tk_saturn GBAtemp Psycho!

    Member
    3,327
    14
    Jan 26, 2010
    Double post:bugger, i'm sure I clicked 'edit' instead of adding a new reply.

    The Merge posts always works when you don't want it to, and never when you do want it to... I can't see why they don't expand it's use to to any double post posted within an hour of the first. Would cut down on the double/ triple posts.

    In fact it's been quite a while since i've seen any posts on here merged, is it broken?
     
  10. ProtoKun7

    ProtoKun7 GBAtemp Time Lord Regenerations: 3

    Global Moderator
    7,518
    1,558
    Jan 3, 2009
    Gallifrey
    Nope, post merging works just fine.

    Don't think I'm familiar with the thumb tag error...
     
  11. tk_saturn

    tk_saturn GBAtemp Psycho!

    Member
    3,327
    14
    Jan 26, 2010
    Try quoting post #8...
     
  12. Inunah

    Inunah The Female Mistaken for a Male.

    Banned
    2,679
    2
    Sep 14, 2009
    United States
    USA
    Amusing as hell! Don't fix this!
     
  13. ProtoKun7

    ProtoKun7 GBAtemp Time Lord Regenerations: 3

    Global Moderator
    7,518
    1,558
    Jan 3, 2009
    Gallifrey
    Nice. [​IMG]
    I probably haven't tried exactly what the OP did with the alignment tags, because I don't think I've had the same trouble.

    I'm still slightly unfamiliar with it though tk, could you perhaps PM the code how you managed it?