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

XF 1.5 Search and replace ?

#1
Code:
What is the best way to replace all of my old VB3.8 youtube code in post's, like:

[YOUTUBE]blablabla[/YOUTUBE]
and replace with
[MEDIA=youtube]blablabla[/MEDIA]

I guess I would have to search for [YOUTUBE] and replace with [MEDIA=youtube] and then search for [/YOUTUBE] and replace with [/MEDIA]

Is there a way to do this in XF or do I need to do it some how in MYPHP?

Thanks!
 

AndyB

Well-known member
#3
In addition to what Chris wrote, I suggest using this in phpMyAdmin, it's nicer to use the same case XenForo does.

Code:
UPDATE xf_post SET message = REPLACE(message, '[youtube]', '[MEDIA=youtube]');
UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '[/MEDIA]');