YouTube BBcode have some troubles

Get help developing custom BBCodes or request one.
Post Reply
User avatar
Seraphinne
Registered User
Posts: 14
Joined: Fri Sep 09, 2011 8:52 pm
Location: The Netherlands
Name: Francisca
Contact:

YouTube BBcode have some troubles

Post by Seraphinne » 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.

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..

User avatar
Mick
Support Team Member
Support Team Member
Posts: 18102
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: YouTube BBcode have some troubles

Post by Mick » Sun Jan 22, 2017 5:40 pm

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.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

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

Re: YouTube BBcode have some troubles

Post by JoshyPHP » 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]
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

User avatar
Seraphinne
Registered User
Posts: 14
Joined: Fri Sep 09, 2011 8:52 pm
Location: The Netherlands
Name: Francisca
Contact:

Re: YouTube BBcode have some troubles

Post by Seraphinne » Mon Jan 23, 2017 11:19 am

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.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 18102
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: YouTube BBcode have some troubles

Post by Mick » Mon Jan 23, 2017 2:30 pm

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. ;)
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

Havym
Registered User
Posts: 20
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: YouTube BBcode have some troubles

Post by Havym » Thu Feb 09, 2017 2:44 pm

I'm waiting for a solution too

What did you change exactly?

Havym
Registered User
Posts: 20
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: YouTube BBcode have some troubles

Post by Havym » Fri Feb 10, 2017 2:08 pm

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?

Havym
Registered User
Posts: 20
Joined: Sun Jan 29, 2017 3:50 pm
Location: Netherlands
Name: Marco

Re: YouTube BBcode have some troubles

Post by Havym » Mon Feb 13, 2017 9:29 pm

Someone with an idea? I'm not good with sql

ubercow
Registered User
Posts: 1
Joined: Sun Apr 09, 2006 2:56 am
Contact:

Re: YouTube BBcode have some troubles

Post by ubercow » Wed Apr 05, 2017 1:01 am

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)

User avatar
ChrisZee
Registered User
Posts: 26
Joined: Tue Dec 22, 2015 9:15 am
Location: Sydney Australia

Re: YouTube BBcode have some troubles

Post by ChrisZee » 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?

User avatar
uw268
Registered User
Posts: 10
Joined: Wed Jul 22, 2015 3:43 am

Re: YouTube BBcode have some troubles

Post by uw268 » Wed Apr 12, 2017 11:52 pm

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?

User avatar
ChrisZee
Registered User
Posts: 26
Joined: Tue Dec 22, 2015 9:15 am
Location: Sydney Australia

Re: YouTube BBcode have some troubles

Post by ChrisZee » Thu Apr 20, 2017 2:32 am

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.

WWu777
Registered User
Posts: 514
Joined: Tue Aug 14, 2007 12:40 pm
Contact:

Re: YouTube BBcode have some troubles

Post by WWu777 » 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.
Last edited by WWu777 on Fri Nov 24, 2017 12:13 pm, edited 1 time in total.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 18102
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: YouTube BBcode have some troubles

Post by Mick » Fri Nov 24, 2017 8:19 am

Try the phpBB Media Embed Plugin no BBCodes required.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 9 guests