Satellite Internet forum
https://www.satsig.net/cgi-bin/yabb/YaBB.pl
Anything else >> General and other topics >> Embedding YouTube video in YaBB forum
https://www.satsig.net/cgi-bin/yabb/YaBB.pl?num=1373102481

Message started by Admin1 on Jul 6th, 2013 at 10:21am

Title: Embedding YouTube video in YaBB forum
Post by Admin1 on Jul 6th, 2013 at 10:21am
Embedding YouTube video in my YaBB forum by forum Admin.

https://www.youtube.com/embed/iCzIi8Km5x4

It took a while for me to learn how to do this.

When you are typing in your message you need to click on the tiny "Insert media" icon. This creates a couple of tags like so:

Code (][media):
[/media]

Between these two tags you need to enter the YouTube url for the video you want Like so:

Code (][media):
https://www.youtube.com/embed/iCzIi8Km5x4[/media]


Use the url provided by youtube when you click on the Share/Embed option below the video.

If you have a YaBB forum then please note that to make this work you need to incorporate the following code in MediaCenter.pl instead of the existing youtube code.


Code (]
$embed_youtube = qq~
    <iframe width="560" height="315" src="_media_" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
~;
[/code):

Akso, insert an s line 35 like so:  (so http becomes https)
[code]
$media_url =~s~https$1:~media:~g;


It would be nice and more future proof if it were possible to simply insert the youtube embed text in between the two media. If you are perl coder and can fix this please tell me. The trouble seems to be that the existing code pulls the input text url apart, as it converted https to http before I added the extra s above.

Best regards, Eric

Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-. All Rights Reserved.