BBCode Youtube marker

Get help developing custom BBCodes or request one.
Post Reply
hrx
Registered User
Posts: 196
Joined: Wed Nov 18, 2015 11:21 am

BBCode Youtube marker

Post by hrx » Wed Sep 19, 2018 4:10 pm

Hi,

I have such a bbcode youtube tag created on the forum:

Code: Select all

[youtube]{IDENTIFIER}://youtu.be/{SIMPLETEXT}[/youtube]

<iframe width="560" height="315" src="{IDENTIFIER}://www.youtube.com/embed/{SIMPLETEXT}" frameborder="0" allowfullscreen></iframe>

Youtube: [youtube]https://youtu.be/[/youtube]
The added short link "youtu.be" in the topic will automatically change to embedded video, but unfortunately the long link will not automatically change to the embedded video. How to fix it?

The short link will change to embedded video:

https://youtu.be/W9P_qUnMaFg

The long link will not change to embedded video:

https://www.youtube.com/watch?v=W9P_qUnMaFg
Last edited by hrx on Mon Sep 24, 2018 11:34 am, edited 1 time in total.

User avatar
KevC
Support Team Member
Support Team Member
Posts: 68477
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: BBCode Youtube marker

Post by KevC » Wed Sep 19, 2018 4:21 pm

Just use the media extension.
https://www.phpbb.com/customise/db/exte ... ediaembed/

It does it all for you regardless of the link and works on tons of other media links as well. No coding needed.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

hrx
Registered User
Posts: 196
Joined: Wed Nov 18, 2015 11:21 am

Re: BBCode Youtube marker

Post by hrx » Mon Sep 24, 2018 10:38 am

Thanks for the information. :)

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 7 guests