WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. DanDini
    Member
    Posted 6 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:

    ]Chudleys[/url]

    with:

    ">Chudleys</a>

    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:

    http://www.slickpepper.dyndns.org/fat-ferrets

    Many thanks,

    Dan

  2. Kafkaesqui

    Posted 6 years ago #

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

    http://www.bbcode-to-html.com/

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

    http://www.ben-xo.com/v6/wordpress-twiki-bbcode-plugin/

  3. DanDini
    Member
    Posted 6 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
    Member
    Posted 6 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

Tags

No tags yet.