Youtube code isn't working anymore?

Get help developing custom BBCodes or request one.
User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Youtube code isn't working anymore?

Post by libralion » Fri Aug 12, 2016 11:20 am

Hi everybody,
All of a sudden the youtube videos on my forums aren't working anymore.
I haven't changed anything. I am using phpbb 3.1.9.
This is the bbcode I have now:

Code: Select all

[youtube]http://{TEXT1}youtube.com/watch?v={TEXT2}[/youtube]
html:

Code: Select all

<!--[if !IE]> -->
  <object type="application/x-shockwave-flash" data="http://{TEXT1}youtube.com/v/{TEXT2}" width="550" height="350">
<!-- <![endif]-->
<!--[if IE]>
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="550" height="350">
    <param name="movie" value="http://{TEXT1}youtube.com/v/{TEXT2}" />
<!--><!-- http://Validifier.com -->
  </object>
<!-- <![endif]-->
I understand the object code isn't valid anymore. I tried to change it to "INTTEXT" or "SIMPLETEXT" as suggested, but that doesn't work either.
Here is one of my forums: http://patriciakaas.nl/forum/viewtopic.php?f=8&t=730
What can I do?

Johanna

User avatar
david63
Registered User
Posts: 16165
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Youtube code isn't working anymore?

Post by david63 » Fri Aug 12, 2016 11:31 am

There was another post today saying something similar, so it sounds as if Youtube have changed something. Have you looked/asked at Youtube?
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code isn't working anymore?

Post by libralion » Fri Aug 12, 2016 11:38 am

david63 wrote:There was another post today saying something similar, so it sounds as if Youtube have changed something. Have you looked/asked at Youtube?
No I haven't asked Youtube, but I don't know exactly when this began. It probably exists longer than today.

Johanna

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code isn't working anymore?

Post by libralion » Fri Aug 12, 2016 12:24 pm

I googled Youtube and change embed codes, but so far I can't find anything on this.

I installed this extension: viewtopic.php?f=456&t=2272431 and that is working very well. But only for new posts.
If we can't find a solution for the problem with the BBcode, can I change the database in phpmyadmin?
I already searched in there for [youtube], but he only found 2 references. There must be lots more.
I have to remove: [ youtube ] and [/youtube] and add an s to the http of the youtube link.
If anyone could help me with this, I would appreciate it.

Johanna
Last edited by libralion on Fri Aug 12, 2016 12:51 pm, edited 2 times in total.

User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7608
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Youtube code isn't working anymore?

Post by JimA » Fri Aug 12, 2016 12:48 pm

Libralion, please only keep one topic per issue. It's easier for us to follow if all information is in one topic.
Also keep in mind that we have a six-hour bump rule. Please edit your post if you have anything to add. :)
Image Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code isn't working anymore?

Post by libralion » Fri Aug 12, 2016 12:52 pm

JimA wrote:Libralion, please only keep one topic per issue. It's easier for us to follow if all information is in one topic.
Also keep in mind that we have a six-hour bump rule. Please edit your post if you have anything to add. :)
Ok just did that, but there were different issues in them.

Johanna

Cheezeaza
Registered User
Posts: 2
Joined: Fri Dec 05, 2014 8:26 pm

Re: Youtube code isn't working anymore?

Post by Cheezeaza » Fri Aug 12, 2016 2:28 pm

YouTube updated the swf file that their (deprecated) flash API uses. Broke plenty of implementations of it.

I recommend using the iframe API for youtube videos: https://developers.google.com/youtube/i ... _reference

davis97266
Registered User
Posts: 27
Joined: Thu Jul 07, 2016 4:33 pm

Re: Youtube code isn't working anymore?

Post by davis97266 » Fri Aug 12, 2016 5:24 pm

libralion wrote:Hi everybody,
All of a sudden the youtube videos on my forums aren't working anymore.
I haven't changed anything. I am using phpbb 3.1.9.
This is the bbcode I have now:


Johanna
This might be of some help. I was having trouble find code that would allow for mobile devices. I was given the correct code by someone here. The link to the discussion is below. I hope it helps...

viewtopic.php?f=481&p=14479206

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code isn't working anymore?

Post by libralion » Sat Aug 13, 2016 5:27 am

Cheezeaza wrote:YouTube updated the swf file that their (deprecated) flash API uses. Broke plenty of implementations of it.

I recommend using the iframe API for youtube videos: https://developers.google.com/youtube/i ... _reference
Ok but that means I have to change all my existing videos. I better use this extension then. It is easier: viewtopic.php?f=456&t=2272431

Johanna

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code isn't working anymore?

Post by libralion » Sat Aug 13, 2016 5:28 am

davis97266 wrote:
libralion wrote:Hi everybody,
All of a sudden the youtube videos on my forums aren't working anymore.
I haven't changed anything. I am using phpbb 3.1.9.
This is the bbcode I have now:


Johanna
This might be of some help. I was having trouble find code that would allow for mobile devices. I was given the correct code by someone here. The link to the discussion is below. I hope it helps...

viewtopic.php?f=481&p=14479206
I tried that, but that didn't work with the links of Youtube I have now.
Exactly what kind of Youtube link should you use in a post?
I am using now: http://www.youtube.com/watch?v=.......

Johanna

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

Re: Youtube code isn't working anymore?

Post by JoshyPHP » Sat Aug 13, 2016 5:53 am

That's because it doesn't work retroactively; It only applies to new posts. If you post a YouTube link or edit a post to add a YouTube link, it should get replaced.
I wrote the thing that does BBCodes in 3.2.

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code isn't working anymore?

Post by libralion » Sat Aug 13, 2016 5:55 am

JoshyPHP wrote:That's because it doesn't work retroactively; It only applies to new posts. If you post a YouTube link or edit a post to add a YouTube link, it should get replaced.
Yes I understand, but that means all the existing Youtube links should be changed and that is a lot of work.

Johanna

zath
Registered User
Posts: 8
Joined: Wed May 20, 2015 12:27 pm

Re: Youtube code isn't working anymore?

Post by zath » Sat Aug 13, 2016 4:43 pm

Please see this thread.

viewtopic.php?f=438&p=14499621#p14499621

I have applied Gandalf's fix to my 3.1.9 forum and the vids now show fine.

User avatar
libralion
Registered User
Posts: 345
Joined: Tue May 13, 2003 9:25 am

Re: Youtube code isn't working anymore?

Post by libralion » Sat Aug 13, 2016 9:33 pm

zath wrote:Please see this thread.

viewtopic.php?f=438&p=14499621#p14499621

I have applied Gandalf's fix to my 3.1.9 forum and the vids now show fine.
Yes but that is a different code from what I am using
So that doesn't work for me.

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

Re: Youtube code isn't working anymore?

Post by JoshyPHP » Sat Aug 13, 2016 9:56 pm

Judging by your first post, I think you will be able to replace your BBCode with the following while preserving backward compatibility:

Code: Select all

[youtube]http://{TEXT1}youtube.com/watch?v={IDENTIFIER}[/youtube]

Code: Select all

<iframe width="640" height="360" src="https://www.youtube.com/embed/{IDENTIFIER}" frameborder="0" allowfullscreen></iframe>
Note that I do not recommend using this BBCode on a new forum. If it was me, I'd use the following BBCode usage instead:

Code: Select all

[youtube]{IDENTIFIER}[/youtube]
That would require to fix all of the old posts though, so that's not something that can be done without some SQL and/or PHP knowledge.
I wrote the thing that does BBCodes in 3.2.

Post Reply

Return to “Custom BBCode Development and Requests”