XF 1.4 Replace old BBCode in Posts

xoa

New member
Hello, I need to replace some old BBCodes in my forum.

This is what I have:

Code:
[iframe]www.mylinktoreplace.it/folder/page.html[/iframe]

And this is what I'd like to have:

Code:
[parsehtml]<iframe width=100% height=1200px frameborder=0 scrolling=yes src="http://www.mylinktoreplace.it/folder/page.html"></iframe>

So basically, I just have to search for
Code:
[iframe]
and replace with
Code:
[parsehtml]<iframe width=100% height=1200px frameborder=0 scrolling=yes src="http://

and search for
Code:
[/iframe]
and replace with
Code:
"></iframe>[/parsehtml]

Easy, but how to realize this?
Thank you ;)
 
Last edited:
If the strings are identical, you can do it in phpMyAdmin.

Code:
UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
 
Wow, that was probably the fastest response I got in a forum. :) I tried this before already, but I was getting an error. Maybe I messed up with something. But this time it worked. Thank you a lot.

EDIT: Oh, I also noticed that I have to update all the links since I'm coming from IPB. I don't know how to do this or if this is possible:

The thread in Xenforo is this one:
Code:
http://forum.cemfactor.com/index.php?threads/svolte-di-popoli-info.1136/

But in another post, the link is still in "IPB style", like this:
Code:
http://forum.cemfactor.com/topic/1136-svolte-di-popoli-info/

I thinks this one is not that easy as the BBCode replacement :)
 
Last edited:
You would really want to handle that with the IPB redirects in the resources (which would handle external links as well).
 
Top Bottom