XF 2.0 YouTube BBCode render problem

Earl

Well-known member
I'm importing from vBulletin 3.8.
I have a custom bb code for YouTube videos in it.
Code:
[yt]youtubeid[/yt]
I need to convert this to regular media YouTube bb code in XF 2 after importing.
I can run a regex search and replace on my posts table and replace it to a normal youtube url but still I don't see xenforo 2 displaying them as embed videos even after rebuild bb codes. It's just displaying as a clickable URL.
 
You should post what you did to replace the BBCode. If you replaced it with a URL, it won't become a media embed because that happens at the time a message is posted. You can see it for yourself by posting a YouTube URL and then edit the message; You'll see that it is replaced by a BBCode such as the following:
Code:
[media=youtube]youtubeid[/media]
 
To convert non standard bb code, you can run a simple query such as:
SQL:
UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');


Which in your case would translate to:
SQL:
UPDATE xf_post SET message = REPLACE(message,'[yt','[media=youtube');
UPDATE xf_post SET message = REPLACE(message,'[/yt','[/media');


Take a backup of the post table first, should you need to revert.[/CODE]
 
Top Bottom