Modern YouTube BBcode

Get help developing custom BBCodes or request one.
Post Reply
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Modern YouTube BBcode

Post by 3Di »

BBCode usage
[youtube]{IDENTIFIER}[/youtube]

HTML replacement

Code: Select all

<span style="display:inline-block;width:100%"><span style="display:block;overflow:hidden;position:relative;padding-bottom:56.25%"><iframe allowfullscreen="" loading="lazy" scrolling="no" src="https://www.youtube.com/embed/{IDENTIFIER}" style="border:0;height:100%;left:0;position:absolute;width:100%"></iframe></span></span>
Help line
Insert YouTube video ID – Example: [youtube]0BU8M0sCXAM[/youtube]

Edit: oops, wrong forum. Feel free to move this topic. :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Modern YouTube BBcode

Post by 3Di »

This responds to any device and automatically expands to the maximum available width.
You can rotate the device and it will automatically adapt.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
hogsty
Registered User
Posts: 8
Joined: Mon Aug 22, 2022 8:39 pm

Re: Modern YouTube BBcode

Post by hogsty »

Hi, I know this topic is a couple months old, but I am just setting up phpbb after accidentally nuking my SMF forum. I need the ability to post youtube videos.

So, how does this work? Do I have to add the HTML code somewhere? I tried just using the bbcode on 3.3.8 and nothing happened. :roll:
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72329
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Modern YouTube BBcode

Post by KevC »

hogsty wrote: Tue Aug 30, 2022 2:51 pm Hi, I know this thread is a couple months old, but I am just setting up phpbb after accidentally nuking my SMF forum. I need the ability to post youtube videos.

So, how does this work? Do I have to add the HTML code somewhere? I tried just using the bbcode on 3.3.8 and nothing happened. :roll:
So much easier with the media extension.
https://www.phpbb.com/customise/db/exte ... ediaembed/

People just post the link and it embeds automatically.

You can add custom BBcode in the admin panel >posting tab
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
Holger
Registered User
Posts: 1883
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: Modern YouTube BBcode

Post by Holger »

Thank you for the bbcode!
I have a bbcode that creates massive pageload and slows down the page massively.
Does the above add less?
My bbcode:

Code: Select all

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

Code: Select all

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

Then, I found this:
https://www.labnol.org/internet/light-y ... eds/27941/
Is this something that can be used for a YT-bbcode?
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2344
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Modern YouTube BBcode

Post by P_I »

KevC wrote: Tue Aug 30, 2022 2:57 pm So much easier with the media extension.
https://www.phpbb.com/customise/db/exte ... ediaembed/

People just post the link and it embeds automatically.
I'll second this advice. My boards originally used a custom BBCode for YouTube and it worked okay.

Once the phpBB Media Embed PlugIn became available, we gladly switched over. It makes posting YouTube (and other media) links much simpler, no BBCodes to remember and properly use.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
Post Reply

Return to “Custom BBCode Development and Requests”