Page 1 of 1

Custom YouTube BBCode

Posted: Mon May 06, 2019 10:46 am
by setnes
It might be fun if we had a custom BBCode for embedding videos from YouTube in our forum posts. These can be setup in the phpBB admin interface by just copying and pasting the replacement code.

This one looks safe (only references YouTube).
https://www.phpbb.com/customise/db/bbcode/youtube/

I would shy away from this one as it references 3rd party code to manufacture the links.
https://www.phpbb.com/customise/db/bbcode/media/

Re: Custom YouTube BBCode

Posted: Mon May 06, 2019 6:04 pm
by StefanPW
Don't we have that to a degree already?
My only annoyance is that the address has to be reformatted to exclude the S in HTTPS, and largely rewritten if you copy a youtu.be link.

Re: Custom YouTube BBCode

Posted: Mon May 06, 2019 9:24 pm
by setnes
Hmm... I guess we do. I never tried with http links, so I just assumed it wasn't working. I'll go test that out. :)

I assume changing it would break existing youtube links unless it was done carefully.

Re: Custom YouTube BBCode

Posted: Mon May 06, 2019 9:39 pm
by setnes
Looks like these instructions would fix the youtube embed code to work with both http and https.

Code: Select all

[youtube]{IDENTIFIER}://www.youtube.com/watch?v={SIMPLETEXT}[/youtube]
from: https://www.phpbb.com/community/viewtop ... &t=2182570

This is really clunky on smaller screens though... I wonder if there's better embed code for that too.

Re: Custom YouTube BBCode

Posted: Tue May 07, 2019 2:47 pm
by Jupiter
There is a great Media Embed Extension from PHPBB that works for all screens and all types of media. From YouTube to Twitter. In fact you do not even need to use the BBCode for it. It will automatically parse anything you post.

https://www.phpbb.com/community/viewtop ... &t=2414716

BUT...

It likely will require a message board upgrade in order to do it. I upgraded the board to 3.2.0 a while back, but since then there have been updates going up to 3.2.7. I just do not have the ftp access to be able to upgrade the message board at the current time. It is why I turned off the Moon Phase Ext. that used to be in the header up top. That Extension needed an upgrade, but I am unable to do any upgrades with out said ftp access to the server.

I am more than willing to update the board again. Just need the ftp credentials to do it. It would allow the message board to get back up to date and add things like that Media Embed Extension. I use this Extension on my own site and I love it.