replacing bbcode with html in all imported posts (4 posts)

  1. DanDini
    Posted 8 years ago #

    I've recently moved from bblog to wordpress and I imported all my old posts using a script that I found here and mucked about a bit to get it to work. The problem is that I should have done more to tidy the bbcode into something wordpress would understand.

    The issue I have is that I need the following replacements:

    [i] --> <em>
    [/i] --> </em>
    [pic] --> <img src="/pictures/
    [/pic] --> .jpg" alt "an imported picture" />
    [url= --> <a href="

    It gets worse here because I would need something that could replace:




    Can someone advise on the php or mysql code I need to do these replacements in all posts please?

    An example of a duff post containing all those issues on my site can be found here:


    Many thanks,


  2. Kafkaesqui

    Posted 8 years ago #

    Guess it would have been useful if the import script had done this, eh? You could use something like:


    to convert post content manually. And this plugin could help temporarily, until everything is converted:


  3. DanDini
    Posted 8 years ago #

    Thanks for that. It would be nice to get the posts sorted properly, but in the meantime, the plugin looks liks a great solution. I'll still need to do some mucking about because of the way the images were plugged in to bblog.

    I'll feed back my experience.

  4. Sridhar Katakam
    Posted 8 years ago #

    You can use http://www.orbit.org/replace/ to make all the changes in one shot in your .sql file.

    Or, like this: http://www.youtube.com/watch?v=0I8Gq_V4p4s

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.