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

XF 1.4 remove all sorts font in forum with regular expressions

Discussion in 'XenForo Questions and Support' started by jamalfree, May 6, 2015.

  1. jamalfree

    jamalfree Active Member

    hello
    how can find and replace all sorts font in forum

    example fonts


    i want keep only content and remove bbcode font like this
    bla bla bla bla bla bla bla

    i see the topic https://xenforo.com/community/resources/post-content-find-replace.1549/ but i didnt know what shoud enter in fields because i have not experience regular expressions
     

    Attached Files:

  2. Brogan

    Brogan XenForo Moderator Staff Member

    Try this.

    Quick Find:
    Code:
    [font
    Regular Expression:
    Code:
    #\[font=([^\]]+)\](.*)\[/font\]#siU
    Replacement String:
    Code:
    \2
    Take a backup first as I haven't tested it.
     
    jamalfree likes this.
  3. jamalfree

    jamalfree Active Member

    thanks brogan i will try later ; can you provide me Method for color its look close method to remove font!!
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Quick Find:
    Code:
    [color=
    Regular Expression:
    Code:
    #\[color=[^\]]+\](.+)\[/color\]#siU
    Replacement String:
    Code:
    \1
     
    jamalfree likes this.
  5. jamalfree

    jamalfree Active Member

    thanks brogan i will try later .....
     
  6. jamalfree

    jamalfree Active Member

    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 99480 bytes) in /home/xxx/public_html/xxx/library/Zend/Db/Statement/Mysqli.php on line 294
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    You are running into a memory limit.

    How many posts do you have?
     
    jamalfree likes this.
  8. jamalfree

    jamalfree Active Member

    106,984
     
  9. jamalfree

    jamalfree Active Member

    if i run addon and he clean my db and if he stopped and i get error and i run addon again to finish his job is correct way or not; perhaps i get problems in
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    The recommended minimum for XF is 128M, which is actually the PHP default.

    You should contact your host and ask them to increase it (or you can try doing it in php.ini - memory_limit).
     
    jamalfree likes this.

Share This Page