XF 2.2 Duplicate BBCODE find & replac

Tiz

New member
I've just done an import from vbulletin and I think one of the users has previously managed to always double up the

Code:
[img][img] and [/img][/img]

img
Is there a way to search and replace the code for posts on that userid to correct this. I searched and it returned a thousand results so a bit much to manually edit!

Thanks
 
You should be able to use something like this query on your database:

SQL:
UPDATE xf_post SET message = REPLACE(message, 'original_content', 'new_content');

In your case, maybe something like:

SQL:
UPDATE xf_post SET message = REPLACE(message, '[img][img]', '[img]');

As always, you should take a backup before performing any direct database queries in case something goes awry.
 
I almost forgot...if you don't feel comfortable (or have access to) doing direct database queries, you could try this addon:


I would still recommend taking a backup before using this, too.
 
Last edited:
Top Bottom