Page 1 of 1

YouTube BBcode have some troubles

Posted: Sun Jan 22, 2017 12:24 pm
by Seraphinne
After updating from 3.1.10 to 3.2 I found a small problem with the BBCode for YouTube videos. I can't seem to find the problem. I have been searching on this forum to find a solution, as I didn't want to polute this subforum with another 'help, YouTube BBcode is not working anymore' topic... sorry!

BBCode usage

Code: Select all

[YouTube]{IDENTIFIER1}://www.youtube.com/watch?v={IDENTIFIER2}{TEXT}[/YouTube]
HTML replacement

Code: Select all

<iframe id="ytplayer" width="560" height="345" src="https://www.youtube.com/embed/{IDENTIFIER2}?origin=http://avo-forum.nl&rel=0&disablekb=0" frameborder="0" allowfullscreen="true"></iframe>
Normally the videos works with BBCodes

Code: Select all

[youtube]URL YouTube Video[/youtube]
and

Code: Select all

[YouTube]URL YouTube Video[/YouTube]
on my forum.

What did I already do:
- I changed to prosilver, as the old theme isn't compatible with 3.2. I am waiting for an update.
- I checked other YouTube bbcodes on this forum if they would work.
- After every change I empty the cache of the forum and my browswer. I have used Chrome and Edge to check if the bbcode is working or not. Also checked on my Android smartphone, but same result. So I kept this code as I think it is better to change this.
- I disables extensions, to see if they are a problem for the bbcode. Just in case. But it didn't matter. I updated extensions that needed an update.
- I posted a few videos after the update in a few different topics and the outcome is different:

1. This is a video heavy topic (mostly YouTube, maybe that is the problem?): http://www.avo-forum.nl/viewtopic.php?f ... 67#p149353 (Non of the YouTube videos are working, I get a black screen and if I click on play I get an error) Used code in last 2 posts:

Code: Select all

[YouTube]https://www.youtube.com/watch?v=JQljICFgFW8[/YouTube]

Code: Select all

[youtube]https://www.youtube.com/watch?v=qcVPd2QA8Zw[/youtube]
2. This is an update topic where I keep the members up-to-date: http://www.avo-forum.nl/viewtopic.php?f ... 66#p149366 (the YouTube video is working here!)
Code used:

Code: Select all

[YouTube]https://www.youtube.com/watch?v=DkKM00jHctY&t=307s[/YouTube]
I came accros the Media Embed PlugIn extension that is still in development, but not sure if that would work for me as I am also using BBCode for vimeo, etc..

Re: YouTube BBcode have some troubles

Posted: Sun Jan 22, 2017 5:40 pm
by Mick
I don't see vimeo either, maybe you could ask the author, I think he's added just about everything people have asked him to. There are a few more topics in this forum on the same or similar subject if you care to drill down a bit.

Re: YouTube BBcode have some troubles

Posted: Sun Jan 22, 2017 6:01 pm
by JoshyPHP
The issue with that BBCode is that {IDENTIFIER2} and {TEXT} can match the same text. If the URL doesn't work, try adding a character at the end of it. For example, [youtube]https://www.youtube.com/watch?v=qcVPd2QA8Zw#[/youtube]

Re: YouTube BBcode have some troubles

Posted: Mon Jan 23, 2017 11:19 am
by Seraphinne
JoshyPHP wrote:
Sun Jan 22, 2017 6:01 pm
The issue with that BBCode is that {IDENTIFIER2} and {TEXT} can match the same text. If the URL doesn't work, try adding a character at the end of it. For example, [youtube]https://www.youtube.com/watch?v=qcVPd2QA8Zw#[/youtube]
That works, and after deleting {TEXT} I can just post the YouTube videos so far I can see.
But still I have the problems with the videos that have been posted before. They are all black screens. How can I fix this problem?

I see that the topic has been moved to a 3.1.x Support Forum. But I have 3.2 at the moment.

Re: YouTube BBcode have some troubles

Posted: Mon Jan 23, 2017 2:30 pm
by Mick
Seraphinne wrote:
Mon Jan 23, 2017 11:19 am
I see that the topic has been moved to a 3.1.x Support Forum. But I have 3.2 at the moment.
That's where it lives for now, it's fine, custom BBCodes still work the same more or less. ;)

Re: YouTube BBcode have some troubles

Posted: Thu Feb 09, 2017 2:44 pm
by Havym
I'm waiting for a solution too

What did you change exactly?

Re: YouTube BBcode have some troubles

Posted: Fri Feb 10, 2017 2:08 pm
by Havym
I found a Beta extension for 3.2.0 that works with just the link to youtube.
It works for me but how can i change all the old bbcode that is used before?
Can is use a sql query?

Re: YouTube BBcode have some troubles

Posted: Mon Feb 13, 2017 9:29 pm
by Havym
Someone with an idea? I'm not good with sql

Re: YouTube BBcode have some troubles

Posted: Wed Apr 05, 2017 1:01 am
by ubercow
Seraphinne wrote:
Sun Jan 22, 2017 12:24 pm
After updating from 3.1.10 to 3.2 I found a small problem with the BBCode for YouTube videos. I can't seem to find the problem. I have been searching on this forum to find a solution, as I didn't want to polute this subforum with another 'help, YouTube BBcode is not working anymore' topic... sorry!

BBCode usage

Code: Select all

[YouTube]{IDENTIFIER1}://www.youtube.com/watch?v={IDENTIFIER2}{TEXT}[/YouTube]
HTML replacement

Code: Select all

<iframe id="ytplayer" width="560" height="345" src="https://www.youtube.com/embed/{IDENTIFIER2}?origin=http://avo-forum.nl&rel=0&disablekb=0" frameborder="0" allowfullscreen="true"></iframe>
Normally the videos works with BBCodes

Code: Select all

[youtube]URL YouTube Video[/youtube]
and

Code: Select all

[YouTube]URL YouTube Video[/YouTube]
on my forum.
had same issue from v3.1.10 to 3.2.0

in BBCode usage change: {IDENTIFIER2}{TEXT}
to: {IDENTIFIER2}{IDENTIFIER3}

in the replaced html change: {IDENTIFIER2}
to: {IDENTIFIER2}{IDENTIFIER3}

your old (and new) videos will still work, as long as they didn't paste in other things into the youtube url (like &asdf=fdsa or #t=1m3s)

Re: YouTube BBcode have some troubles

Posted: Tue Apr 11, 2017 2:49 am
by ChrisZee
had same issue from v3.1.10 to 3.2.0

in BBCode usage change: {IDENTIFIER2}{TEXT}
to: {IDENTIFIER2}{IDENTIFIER3}

in the replaced html change: {IDENTIFIER2}
to: {IDENTIFIER2}{IDENTIFIER3}

your old (and new) videos will still work, as long as they didn't paste in other things into the youtube url (like &asdf=fdsa or #t=1m3s)
Thanks Ubercow.

But not working for me..

Any ideas?

Re: YouTube BBcode have some troubles

Posted: Wed Apr 12, 2017 11:52 pm
by uw268
My forum has the same issue. Please help us to solve the YouTube BBcode.

Thanks.
ChrisZee wrote:
Tue Apr 11, 2017 2:49 am
had same issue from v3.1.10 to 3.2.0

in BBCode usage change: {IDENTIFIER2}{TEXT}
to: {IDENTIFIER2}{IDENTIFIER3}

in the replaced html change: {IDENTIFIER2}
to: {IDENTIFIER2}{IDENTIFIER3}

your old (and new) videos will still work, as long as they didn't paste in other things into the youtube url (like &asdf=fdsa or #t=1m3s)
Thanks Ubercow.

But not working for me..

Any ideas?

Re: YouTube BBcode have some troubles

Posted: Thu Apr 20, 2017 2:32 am
by ChrisZee
I sort of found a fix guys.

install this extension into your extension folder.
viewtopic.php?f=456&t=2272431

Then go into your ACP and click on manage extensions to enable it.
Then watch those youtube links come alive again :D

make sure you delete the old youtube bbcode text tags [/youtube] in your posts, so the old youtube links can work

Unless ofcourse there is a way to delete the text tags [/youtube] on every post automatically using an extension?.. it would make things so much easier.

Anyone know how to remove old bbcode tags in posts?

I hate to have to edit hundreds of older posts to remove youtube bbcode manually.

Re: YouTube BBcode have some troubles

Posted: Thu Nov 23, 2017 9:36 pm
by WWu777
I just upgraded to phpbb 3.2 and this YouTube BBCode works with mine.

BBCode usage

Code: Select all

[youtube]{SIMPLETEXT}://www.youtube.com/watch?v={IDENTIFIER}[/youtube]
HTML replacement

Code: Select all

<iframe width="560" height="315" src="//www.youtube.com/embed/{IDENTIFIER}" frameborder="0" allowfullscreen></iframe>
If all your videos have turned into links, you can re-embed them using the above code and YouTube tags. To re-embed a YouTube video in your post that already has the YouTube tags around it, simply edit it by clicking on the pencil icon in your post, and changing at least one character in it, then resubmitting it. Please note that you have to change at least one character in the post, or the video will not embed. Once you do, the video will re-embed. I've tested it and that's how it works.

Re: YouTube BBcode have some troubles

Posted: Fri Nov 24, 2017 8:19 am
by Mick
Try the phpBB Media Embed Plugin no BBCodes required.

Re: YouTube BBcode have some troubles

Posted: Thu Dec 14, 2017 8:09 am
by iltexano
WWu777 wrote:
Thu Nov 23, 2017 9:36 pm
I just upgraded to phpbb 3.2 and this YouTube BBCode works with mine.

BBCode usage

Code: Select all

[youtube]{SIMPLETEXT}://www.youtube.com/watch?v={IDENTIFIER}[/youtube]
HTML replacement

Code: Select all

<iframe width="560" height="315" src="//www.youtube.com/embed/{IDENTIFIER}" frameborder="0" allowfullscreen></iframe>
If all your videos have turned into links, you can re-embed them using the above code and YouTube tags. To re-embed a YouTube video in your post that already has the YouTube tags around it, simply edit it by clicking on the pencil icon in your post, and changing at least one character in it, then resubmitting it. Please note that you have to change at least one character in the post, or the video will not embed. Once you do, the video will re-embed. I've tested it and that's how it works.
Worked perfectly, thanks!