MyBB Community Forums

Full Version: HTML to BBcode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there. We converted a large forum to MyBB, but, for some reason all of our codes such as [url= got changed to <a href= etc. We don't know how to fix this, and it's time consuming to edit tens of thousands of posts.

I know this can easily be fixed via SQL, but, can someone help me write SQL queries to run?

I think it'd be something similar to:
UPDATE `mybb_posts` SET `message` = REPLACE(message, '<a href="%">', '[url=%]'
WHERE `mybb_posts` LIKE '<a href="%">'

But I'm so clueless and probably murdered that line. :(

We're having problems with the following:
  • <div align="center">
  • <div align="right">
  • <a href=""></a>
  • [color=#HEX ] <- For some reason we got spaces! o.o
  • [list type="decimal"]
Hi Alan Shepperson; Thanks!

That code looks Fren—Greek to me! Trying to sort through it now. Thank you. But, I have no idea what it does so it makes me nervous about doing anything. What is regexp? What does DELIMITER mean? And UNSIGNED?

Sorry. It seems easier to edit thousands of posts now o_o. Thanks for your help though.
REGEXP is a different abbreviation of REGEX (Regular Expression). A regular expression is used for matching patterns.