Module: BBcode Video
Posted by Maurice Makaay
Re: Module: BBcode Video August 25, 2014 03:57PM |
Admin Registered: 18 years ago Posts: 566 |
I am not sure that is a minor fix. It also creates a problem for when everything is https, and is not available http.
Are the videos playing in your Phorum message, rather than in a new window or tab? What happens if you open the video in a new window or tab?
Is the browser blocking the content, because the content on your page comes from two different domains.
Or
Some secure, some not?
Are the videos playing in your Phorum message, rather than in a new window or tab? What happens if you open the video in a new window or tab?
Is the browser blocking the content, because the content on your page comes from two different domains.
Or
Some secure, some not?
Re: Module: BBcode Video August 25, 2014 04:24PM |
Registered: 13 years ago Posts: 71 |
Thanks for the quick response. Hopefully this answers your question.
For example, this BB-code
[video]https://www.youtube.com/watch?v=_sgfWiJPNUc[/video]
shows this...
but this....
[video]http://www.youtube.com/watch?v=_sgfWiJPNUc[/video] <same link without the s. Shows the actual video embedded fine on the site.
This is always an issue for all youtube links since by default the share link is https:, so even forcing the s out of youtube only links would work most of the time.
For example, this BB-code
[video]https://www.youtube.com/watch?v=_sgfWiJPNUc[/video]
shows this...
but this....
[video]http://www.youtube.com/watch?v=_sgfWiJPNUc[/video] <same link without the s. Shows the actual video embedded fine on the site.
This is always an issue for all youtube links since by default the share link is https:, so even forcing the s out of youtube only links would work most of the time.
Re: Module: BBcode Video September 03, 2014 02:07PM |
Registered: 13 years ago Posts: 71 |
Re: Module: BBcode Video September 04, 2014 12:00AM |
Admin Registered: 18 years ago Posts: 566 |
Re: Module: BBcode Video September 05, 2014 12:32PM |
Registered: 13 years ago Posts: 71 |
^Thank you Scott!
For the fix I added this code to the file "bbcode_video.php"
directly underneath this code...
If anyone is listening I'd recommend this be added to the next release version since MOST if not all youtube links when copied from Youtube start with "https:"
Edited 1 time(s). Last edit at 09/05/2014 12:36PM by rchecka.
For the fix I added this code to the file "bbcode_video.php"
$search[] = "/[video\]https:\/\/(\w+\.)?youtube.com\/watch\?v=([\w_-]+)[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#]*[\/video\]/is"; $replace[] = "[video]youtube:$2[/video]";
directly underneath this code...
$search[] = "/[video\]http:\/\/(\w+\.)?youtube.com\/watch\?v=([\w_-]+)[a-z0-9;\/\?:@=\&\$\-_\.\+!*'\(\),~%#]*[\/video\]/is"; $replace[] = "[video]youtube:$2[/video]";
If anyone is listening I'd recommend this be added to the next release version since MOST if not all youtube links when copied from Youtube start with "https:"
Edited 1 time(s). Last edit at 09/05/2014 12:36PM by rchecka.
Re: Module: BBcode Video September 18, 2014 03:13PM |
Registered: 20 years ago Posts: 123 |
I think I just changed all the "/[video\]http" to "/[video\]https?" for all url patterns in bbcode_video.php a long time ago
The "s?" means the regular expression (regex) will match an optional s
Skye
___
Skye Nott
Corvus Digital
The "s?" means the regular expression (regex) will match an optional s
Skye
___
Skye Nott
Corvus Digital
Re: Module: BBcode Video July 27, 2015 08:04PM |
Registered: 9 years ago Posts: 10 |
Re: Module: BBcode Video July 28, 2015 11:00AM |
Admin Registered: 18 years ago Posts: 566 |
Look at this topic and see if it is helpful. (Note, even though it has the same topic title, it is in the Phorum 5.1 Modules..
[www.phorum.org]
[www.phorum.org]
Re: Module: BBcode Video July 29, 2015 03:23PM |
Registered: 20 years ago Posts: 123 |
Quote
ToddUGA
Anybody know how to modify the code so that youtu.be links work? Been taking a whack at it and so far have not been successful.
I added this to phorum_mod_bbcode_video_format()
Language: PHP$search[] = "/\[video\]https?:\/\/youtu.be\/([\w_-]+)\[\/video\]/is"; $replace[] = "[video]youtube:$1[/video]";
and this to the "handle_plain_urls" conditional section just below
Language: PHP$search[] = "/https?:\/\/?youtu.be\/([\w_-]+)/is"; $replace[] = "[video]youtube:$1[/video]";
___
Skye Nott
Corvus Digital
Re: Module: BBcode Video September 14, 2015 04:55AM |
Registered: 18 years ago Posts: 216 |
Sorry, only registered users may post in this forum.