XF 1.4 Youtube BBcode not parsing

Soyuz

Member
Does anyone know why the [ youtube ] [ /youtube] BBcode is not parsing in my forum? (screenshot attached). It's a migrated forum (from phpBB). Curious thing: if I edit the post and put a carriage return behind the youtube bbcode, it parses to...

Code:
[youtube][MEDIA=youtube]6dTUFVvqla4[/MEDIA]

...and the video appears, but with that [ youtube ] left behind.
 

Attachments

  • Captura de pantalla 2015-05-09 a las 0.15.42.webp
    Captura de pantalla 2015-05-09 a las 0.15.42.webp
    47.1 KB · Views: 12
The XF bb code tag is media=youtube, not youtube.

You will either need to create a new youtube bb code tag, or replace all instances with media=youtube.
Code:
UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
 
Ok thank you :) Anyway I'm not sure how to proceed, because there are several valid URLs for inserting youtube videos, i.e.:

Code:
youtube.com/watch?v=XXXX
youtu.be/XXXX

...and the Custom BBcode editor does not work in this way. It does not accept strings like that (you just create the BBcode and it assumes that the whole string between BBcodes is the {text}). Or maybe I'm not used to it yet...
 
You will either need to create a new youtube bb code tag, or replace all instances with media=youtube.
Code:
UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');

Code:
UPDATE xf_post SET message = REPLACE(message, '[youtube]', '[media=youtube]');
UPDATE xf_post SET message = REPLACE(message, '[/youtube]', '[/media]');
 
It sounds like your YouTube BB code took the entire URL as the argument, which isn't how the media tag works. That's not something that would be easy to convert unless you are comfortable writing various regular expressions (and using a tool to do the replacement). You may need to create a custom BB code (though without PHP, it's unlikely to be able to embed the video).
 
Back
Top Bottom