Advertisment: Broadband via satellite
Advertisment: Worldwide satellite services from Ground Control Company

Satellite Internet Forum.

Welcome, Guest.        Forum rules.
      Home            Login            Register          
Pages: 1

Embedding YouTube video in YaBB forum

(Read 257731 times)
YaBB Admin

Posts: 1198
Jul 6th, 2013 at 10:21am  
Embedding YouTube video in my YaBB forum by forum Admin.

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:

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

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 instead of the existing youtube code.

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

Akso, insert an s line 35 like so:  (so http becomes https)
$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
Back to top
« Last Edit: Aug 22nd, 2020 at 8:19pm by Admin1 »  
IP Logged
Pages: 1