1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

sql statement to remove custom bbcode

Discussion in 'Installation, Upgrade, and Import Support' started by Nasr, Feb 23, 2013.

  1. Nasr

    Nasr Well-Known Member

    I need help removing custom BBcode with an sql statement from all of my posts.

    my bbcode looks like this

    [ALIGN=CENTER][TABLETEXT="width:80%;background-color:crimson;border:8px solid burlywood;"][CELL="filter:;"][ALIGN=center]
    [ALIGN=CENTER][TABLETEXT="width:70%;background-color:black;"][CELL="filter:;"][ALIGN=center]

    What I want to do is remove the opening bracket everything between it that has english letters and remove closing brackets.

    basically, anything that's english or numbers or any signs between [ and ] should be removed.
     
  2. EQnoble

    EQnoble Well-Known Member

    first off...there is no need to do it with an sql statement , you can use kiers post replacement addon...http://xenforo.com/community/threads/post-content-find-replace.6548/

    second....if you want some help I would need a better example of what you want...
    by your explanation....
    [ALIGN=CENTER][TABLETEXT="width:80%;background-color:crimson;border:8px solid burlywood;"][CELL="filter:;"]
    becomes...
    [][][]
     
    Jake Bunce and Nasr like this.
  3. Nasr

    Nasr Well-Known Member

    Ok Kiers add on will do.

    What I want to do is remove all of that bbcode including the brackets.
     
  4. EQnoble

    EQnoble Well-Known Member

    I would like to see a few full examples of these table codes from your site, I can't possibly write you a regular expression without knowing everything that needs to be caught and possibly avoided.

    can you copy and paste a bunch of examples separated by line breaks
    Code:
    into
     
    a
     
    code
     
    box?
     
    Jake Bunce likes this.
  5. Nasr

    Nasr Well-Known Member

    Code:
    [ALIGN=CENTER][TABLETEXT="width:80%;background-color:crimson;border:8px solid burlywood;"][CELL="filter:;"][ALIGN=center]
    [ALIGN=CENTER][TABLETEXT="width:70%;background-color:black;"][CELL="filter:;"][ALIGN=center]
    [/ALIGN][/CELL][/TABLETEXT][/ALIGN]
    [/ALIGN][/CELL][/TABLETEXT][/ALIGN]
     
    [ALIGN=CENTER][TABLETEXT="width:70%;background-color:black;"][CELL="filter:;"] [URL='http://banibkr.com/showthread.php?p=286875#post286875'][IMG]http://banibkr.com/net1.com.sa/red/buttons/viewpost.gif[/IMG][/URL]
    [I][ALIGN=CENTER][TABLETEXT="width:60%;background-image:url('http://banibkr.com//backgrounds/22.gif');"][CELL="filter:;"][FONT=Arial][SIZE=5][COLOR=red][ALIGN=center]
    [/ALIGN][/COLOR][/FONT][/CELL][/TABLETEXT][/ALIGN]
     
     
    [poem=font=",6,black,normal,normal" bkcolor="transparent" bkimage="" border="none,4," type=0 line=0 align=center use=ex num="0,black""]
    [/poem]
     
    [poem=font=",6,blue,normal,normal" bkcolor="transparent" bkimage="" border="none,4," type=0 line=0 align=center use=ex num="0,black""]
     
    [/poem]
    
    These are a few. There are some others. What I was hoping to do is clear everything that's between the brackets.
     
  6. EQnoble

    EQnoble Well-Known Member

    so you want
    Code:
    [to remove anything here including the brackets]
    and keep anything here 
    [/and remove anything here]
    ?

    And you want to strip everything off of which tags...I need an exact list of tags
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page