Converting youtube clips embedded with BB-code to xF

DoctorWatsOn

Well-known member
Before vB introduced youtube embedding, I was using BB-code and when I imported my vb4 data into xF it didn’t convert these, so posts just show:

[youtube]xp9Gm-aRe5A&hl[/youtube]
OR
[YOUTUBE]it-gPAhFq1c[/YOUTUBE]

Is there anyway these can be converted to make them display?
 
You can run some SQL queries to update the post table.

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

Make sure you take a backup first....just in case.
 
You can run some SQL queries to update the post table.

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

Make sure you take a backup first....just in case.

Will that work, because the [youtube] tags only include the video ID, whereas xF's [ media=youtube] tags use the whole URL?
 
I'm going to need this too.
If only there was a way to bookmark these posts for future use. (Other than saving bookmarks with your browser.)
Why not update the BB Code and the post table on your forum now?

That's what I've done so when it comes to switching I won't need to update anything.
 
Is this easier than running the SQL queries?

Not that I know how to do either. :oops:
Well you will have to run the queries whether you do it on your current database or after you convert as all of the historic post content will have to be updated.

I just prefer to get as much done beforehand so there is less to do after I switch.
 
You can run some SQL queries to update the post table.

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

Make sure you take a backup first....just in case.

That works the best.
Make sure you run both for youtube and YOUTUBE
 
Top Bottom