• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Removing an irrelevant BBCode en masse from database?

#1
Good Morning XF!

I just recently migrated from SMF to XenForo and I have a bunch, a BUNCH of clean up work to do. Part of that is stripping out things from the posts that are no longer relevent.

Is there a way to do a database query (or whatever it is called) that will strip out [smurfy] and [/smurfy] from all my posts? Going through 50000 posts to ensure that none of them have this old BBCode would really be ummm less than ideal.
 

Brogan

XenForo moderator
Staff member
#4
An example query would be:
Code:
UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
 
#5
Code:
UPDATE xf_post SET message = REPLACE(message,'[smurfy]','');
So like that? Replacing the new content with nothing is okay or do I need a space in there?