YouTube embedded videos "black bar" picture problem

Get help developing custom BBCodes or request one.
User avatar
JoshyPHP
Code Contributor
Posts: 999
Joined: Mon Jul 11, 2011 12:28 am

Re: YouTube embedded videos "black bar" picture problem

Post by JoshyPHP » Sun Aug 14, 2016 10:26 pm

You don't put an URL in there, only the ID of the video, e.g.

Code: Select all

[youtube]DEkmq7JIE50[/youtube]
I wrote the thing that does BBCodes in 3.2.

User avatar
Darloup
Registered User
Posts: 302
Joined: Sun Jun 27, 2010 8:59 pm
Location: Barranquilla (Colombia)
Name: Henry
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Darloup » Mon Aug 15, 2016 12:28 am

Many thanks JoshyPHP for this important information! It's now working perfectly!

I've thus created a new BBCode [youtube][/youtube] which I shall therefore use from here onward (that is to say, for all new posts).

But what about my old posts? I'm now left with hundreds of videos which don't display any longer. All these videos were displayed using a BBCode called [video][/video]. In the posts, all videos appear with this structure:

Code: Select all

[video]http://www.youtube.com/watch?v=TQNt2iwnpjY[/video]
or

Code: Select all

[video]https://www.youtube.com/watch?v=TQNt2iwnpjY[/video]
This [video][/video] BBCode was:

Code: Select all

[video]{TEXT}[/video]

Code: Select all

<script type="text/javascript" src="video.php?link={TEXT}"></script>
There was also a video.php file which I had to upload the root of my forum.

So, what should I do in order to display my old youtube videos? Ideally, I would need a BBCode with the same name [video][/video] where the full URL of the video is included (e.g. http://www.youtube.com/watch?v=TQNt2iwnpjY).

Is this possible?

Or, perhaps, could the video.php file could be modified?

What do you advise?

Regards,

Henry

User avatar
JoshyPHP
Code Contributor
Posts: 999
Joined: Mon Jul 11, 2011 12:28 am

Re: YouTube embedded videos "black bar" picture problem

Post by JoshyPHP » Mon Aug 15, 2016 12:41 am

Yes, you'll need to modify that video.php file. That's not the first time I read about it but I don't know what extension/MOD this is from. You'll probably see some YouTube-related markup that you'll need to modify to use the proper iframe rather than a Flash object.
I wrote the thing that does BBCodes in 3.2.

User avatar
Darloup
Registered User
Posts: 302
Joined: Sun Jun 27, 2010 8:59 pm
Location: Barranquilla (Colombia)
Name: Henry
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Darloup » Mon Aug 15, 2016 12:59 am

JoshyPHP wrote:Yes, you'll need to modify that video.php file. That's not the first time I read about it but I don't know what extension/MOD this is from. You'll probably see some YouTube-related markup that you'll need to modify to use the proper iframe rather than a Flash object.
OK, thanks! Where is the proper place on this forum to upload this video.php file and request a kind and knowledgeable soul to modify it? ;)

globalmsg
Registered User
Posts: 1
Joined: Mon Aug 15, 2016 4:21 pm

Re: YouTube embedded videos "black bar" picture problem

Post by globalmsg » Mon Aug 15, 2016 4:25 pm

Hi All,
The IE and Chorme on my have stopped to display this embedded YouTube video:

<div class="widget widget-video" id="widget-da6610af-2c92-2729-7dab-a83a434d6fd0">
<div class="widget-content"><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/mVvc6NUeoHo?hl ... ram><param name="allowfullscreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="opaque"></param><embed width="480" height="385" type="application/x-shockwave-flash" src="http://www.youtube.com/v/mVvc6NUeoHo?hl ... rel=0&fs=1" allowfullscreen="true" allowscriptaccess="always" wmode="opaque"></embed></object></div>
</div>

Anyone knows what is the cause of this situation.

I do not see a video screenshot with a play button, only black box...

User avatar
Lumpy Burgertushie
Registered User
Posts: 66326
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Lumpy Burgertushie » Mon Aug 15, 2016 5:24 pm

youtube has discontinued the embed object type of embed code. they said they were going to do it several years ago and finally did. you need to read the rest of the posts in this topic to find out how to switch over to the iframe embed code for your bbcode.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Darloup
Registered User
Posts: 302
Joined: Sun Jun 27, 2010 8:59 pm
Location: Barranquilla (Colombia)
Name: Henry
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Darloup » Tue Aug 16, 2016 12:02 am

Hello,

Still on the subject of my video.php file, this is the line of coding for youtube videos:

Code: Select all

array('/youtube\.com.*v=([^&]*)/i', '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/{ID_VIDEO}"></param><embed src="http://www.youtube.com/v/{ID_VIDEO}" type="application/x-shockwave-flash" width="425" height="344"></embed></object>'),
Does anyone know which changes I have to make in order for my old video BBCode to work?

With my anticipated thanks,

Henry

User avatar
Lumpy Burgertushie
Registered User
Posts: 66326
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Lumpy Burgertushie » Tue Aug 16, 2016 12:48 am

your best bet is to simply change out your old bbcode for the iframe bbcode.

I think I saw in one of these topics where if you do that just right it will work on your old ones as well as new ones.

not sure why you were using that php file to begin with. all it does is create the same bbcode that you could have created yourself in your admin panel. that is the same one that is now broken.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
Darloup
Registered User
Posts: 302
Joined: Sun Jun 27, 2010 8:59 pm
Location: Barranquilla (Colombia)
Name: Henry
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Darloup » Tue Aug 16, 2016 1:49 am

Hello,
Lumpy Burgertushie wrote: not sure why you were using that php file to begin with. all it does is create the same bbcode that you could have created yourself in your admin panel. that is the same one that is now broken.
This BBCode is/was very useful because it was a kind of "universal" BBCode (with the help of the video.php file).

With one single BBCode you could display videos from youtube, dailymotion, google, myspace, photobucket, yahoo, etc. More than 30 sources.

Regards,

Henry

Majyk Oyster
Registered User
Posts: 1
Joined: Tue Aug 16, 2016 1:30 pm

Post by Majyk Oyster » Tue Aug 16, 2016 1:34 pm

For those who want to use video.php, replace old code with this (line 15) :

Code: Select all

array('/youtube\.com.*v=([^&]*)/i', '<iframe width="640" height="360" src="https://www.youtube.com/embed/{ID_VIDEO}" frameborder="0" allowfullscreen></iframe>'),
Last edited by Majyk Oyster on Tue Aug 16, 2016 1:55 pm, edited 1 time in total.

Puntadelanza
Registered User
Posts: 124
Joined: Thu Jul 03, 2003 10:48 am
Location: Spain
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Puntadelanza » Tue Aug 16, 2016 1:38 pm

baller1234 wrote:use STK to reparse your topics.
Hello,
What is STK? And how can I use it?

I'm trying this solution:
JoshyPHP wrote:That one.

Code: Select all

[youtube]{IDENTIFIER}[/youtube]

Code: Select all

<iframe width="640" height="360" src="https://www.youtube.com/embed/{IDENTIFIER}" frameborder="0" allowfullscreen></iframe>
But with no result in old posts.
I've in plain text: [youtube]http://www.youtube.com/watch?v=H8zxy17RbGY[/youtube]

Did you know how can I fix it?
Many thanks in advance!
Estrategia, táctica y sobre todo Combat Mission.
Punta de Lanza

baller1234
Registered User
Posts: 129
Joined: Sat May 29, 2010 9:43 am

Re: YouTube embedded videos "black bar" picture problem

Post by baller1234 » Tue Aug 16, 2016 2:38 pm

replace all

Code: Select all

http://www.youtube.com/
to

Code: Select all

https://www.youtube.com/
with phpmyadmin

then download https://www.phpbb.com/support/stk/

and put the complete folder it in your root dir (where your config.php is)

Then browse to the stk..
Go to

Code: Select all

http://domain.com/stk

and click tab admin tools and then choose reparse bbcode

User avatar
Darloup
Registered User
Posts: 302
Joined: Sun Jun 27, 2010 8:59 pm
Location: Barranquilla (Colombia)
Name: Henry
Contact:

Re:

Post by Darloup » Wed Aug 17, 2016 1:02 am

Hello Majyk Oyster,
Majyk Oyster wrote:For those who want to use video.php, replace old code with this (line 15) :

Code: Select all

array('/youtube\.com.*v=([^&]*)/i', '<iframe width="640" height="360" src="https://www.youtube.com/embed/{ID_VIDEO}" frameborder="0" allowfullscreen></iframe>'),
Great - many thanks! I've modified my video.php file according to your instructions, and all my old youtube videos are displaying once more!

You rock!

Regards,

Henry

Puntadelanza
Registered User
Posts: 124
Joined: Thu Jul 03, 2003 10:48 am
Location: Spain
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by Puntadelanza » Wed Aug 17, 2016 10:37 am

baller1234 wrote:replace all

Code: Select all

http://www.youtube.com/
to

Code: Select all

https://www.youtube.com/
with phpmyadmin

then download https://www.phpbb.com/support/stk/

and put the complete folder it in your root dir (where your config.php is)

Then browse to the stk..
Go to

Code: Select all

http://domain.com/stk

and click tab admin tools and then choose reparse bbcode

Thanks for the answer, but...
If I will use:
JoshyPHP wrote:That one.

Code: Select all

[youtube]{IDENTIFIER}[/youtube]

Code: Select all

<iframe width="640" height="360" src="https://www.youtube.com/embed/{IDENTIFIER}" frameborder="0" allowfullscreen></iframe>
For my old topics, and using phpmyadmin as you told me, I think that I shuld replace:

Code: Select all

http://www.youtube.com/
for nothing.... as in this line:

Code: Select all

[youtube]{IDENTIFIER}[/youtube]
you put only the identifier of the video with no url....

I'm right?

Thanks for the information regarding, STK.



I've try diferents answers provided, but no one works for my old posts....

Many thanks.
Estrategia, táctica y sobre todo Combat Mission.
Punta de Lanza

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17007
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: YouTube embedded videos "black bar" picture problem

Post by DavidIQ » Fri Aug 19, 2016 2:57 am

Puntadelanza wrote:For my old topics, and using phpmyadmin as you told me, I think that I shuld replace:

Code: Select all

http://www.youtube.com/
for nothing.... as in this line:

Code: Select all

[youtube]{IDENTIFIER}[/youtube]
you put only the identifier of the video with no url....

I'm right?
There should be no reason to use phpMyAdmin to change anything in the database as there would be no point in doing so as you found out. If you update your BBCode definition through the ACP, as has been instructed, then it should work just fine right out of the box, unless you're not running 3.0 or 3.1.

I've also verified the iframe replacement works fine on 3.1 and works immediately for older posts.

As an aside to anyone else coming to this topic: even though a more than satisfactory resolution has already been provided here an approved and working BBCode definition was already in existence in our CDB:
https://www.phpbb.com/customise/db/bbcode/youtube/
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Post Reply

Return to “Custom BBCode Development and Requests”