We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Request for code change before next update | Forum

Mark
Mark Jan 26 '14

Hello everyone! I was hoping to make a request to a simple change in the code. It would be great if we could do this before the next update as that would keep me from having to go back in and modify the code again.


Anyway, as I was developing Oxwall I was working on getting the SSL locked down everywhere and of course doing a few little tweeks on the appearance. I ran into an issue where the YouTube thumbnails were being called from YouTube under http. As you know that was then creating an SSL issue.


I went in and modified the code and of course I had to go into the database and modify the URL entries for videos that were already embedded. Once that was done I tested my changes and now the YouTube thumbnails are displaying as proper https calls with no errors.


The code change is located in this file:  ow_plugins/video/classes/video_providers.php


The code change shown below merely requires changing the http to read https and you can see the modified code below in bold letters.


class VideoProviderYoutube
{
    const clipUidPattern = '\/\/www\.youtube(-nocookie)?\.com\/(v|embed)\/([^?&"]+)[?&"]';
    const thumbUrlPattern = 'https://img.youtube.com/vi/()/default.jpg';


If we can get this minor code change before the next update it will be helpful to anyone who wishes to run Oxwall in HTTPS without errors. If you have any questions or feed back I am happy to hear that. Cheers!

Mark
Mark Jan 26 '14
Good question Leon but as far as I know if you call the image thumbnail in https it would not have affect to an http only site. On the other had for an https site if you call it on http it creates and ssl error. It should be that if we just always call that image on https from youtube then whether your oxwall site is http or https it will be okay either way. Hopefully a dev will chime in here and let us know for sure...