Announcement

Collapse
No announcement yet.

Instructions for cleaner.php after phpBB3 conversion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BirdOPrey5
    replied
    *MAKE SURE YOU HAVE A BACKUP OF THE DATABASE BEFORE USING cleaner.php*

    First return the "$replacer" lines you posted above back to default. When you do a regex you can only do one at a time.

    You need to find the line in cleaner.php:
    PHP Code:
            #$text = preg_replace('##siU', '', $text); 
    and change it to:
    PHP Code:
            $text preg_replace('#\[center:*[\w]*]#siU''[center]'$text); 
    I removed the comment and added the regex in red. I'm not sure where you got the regex in your example but I don't think it will work, this one should.

    Leave a comment:


  • hellekim
    started a topic Instructions for cleaner.php after phpBB3 conversion

    Instructions for cleaner.php after phpBB3 conversion

    I've searched and searched, but couldn't find an actual answer. Answer seems to be that check the manual, but I suppose me and many others don't understand anything about regex and similar coding things.

    I'm trying to convert phpBB tags such as [center:hpa7u2kc] to plain [center]. I tried something like this:

    Code:
    $replacer = array(      
                "$regEx = '#\[center:\/\([a-zA-Z0-9]*\)]/"]#';"    => "[center]",
                ""    => "",
                ""    => "",
                ""    => "",
                ""    => ""
    );
    But it won't work and I haven't got a clue what to do. I hope someone could provide a working example - I think this would solve issues with other tags and for many users.

    Thank you!

Related Topics

Collapse

Working...
X