From c06886bbc2f82f9145ec400c3be7de978ce47330 Mon Sep 17 00:00:00 2001 From: Suki Date: Sun, 2 Aug 2015 10:40:13 -0500 Subject: [PATCH] Change the readme and update the sizes Signed-off-by: Suki --- Sources/OharaYTEmbed.php | 10 +++++----- readme.txt | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Sources/OharaYTEmbed.php b/Sources/OharaYTEmbed.php index ca6e101..f1af8ab 100644 --- a/Sources/OharaYTEmbed.php +++ b/Sources/OharaYTEmbed.php @@ -168,7 +168,7 @@ function OYTE_Main($data) // Got something! else - $result = '
'; + $result = '
'; return $result; } @@ -186,13 +186,13 @@ function OYTE_Vimeo($data) require_once($sourcedir .'/Subs-Package.php'); // Construct the URL - $oembed = 'https://vimeo.com/api/oembed.json?url=' . rawurlencode($data) . '&width='. (empty($modSettings['OYTE_video_width']) ? '420' : $modSettings['OYTE_video_width']) .'&height='. (empty($modSettings['OYTE_video_height']) ? '315' : $modSettings['OYTE_video_height']); + $oembed = 'https://vimeo.com/api/oembed.json?url=' . rawurlencode($data) . '&width='. (empty($modSettings['OYTE_video_width']) ? '480' : $modSettings['OYTE_video_width']) .'&height='. (empty($modSettings['OYTE_video_height']) ? '270' : $modSettings['OYTE_video_height']); //Attempts to fetch data from a URL, regardless of PHP's allow_url_fopen setting $jsonArray = json_decode(fetch_web_data($oembed), true); if (!empty($jsonArray) && is_array($jsonArray) && !empty($jsonArray['html'])) - return '
'. str_replace(''; + return '
'. str_replace(''; else @@ -247,8 +247,8 @@ function OYTE_care(&$dummy) // Add our css and js files. Dear and lovely mod authors, if you're going to use $context['html_headers'] MAKE SURE you append your data .= instead of re-declaring the var! and don't forget to add a new line and proper indentation too! $context['html_headers'] .= ' diff --git a/readme.txt b/readme.txt index 382816d..00f4956 100644 --- a/readme.txt +++ b/readme.txt @@ -49,13 +49,18 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. [color=purple][b][size=12pt]Changelog[/size][/b][/color] +[code] +1.2.4 - August 2, 2015, +- Added responsiveness to videos. +- Re-wrote the JS code to use prototypes. +- Change the default size values to 480 x 270. -[b]1.2.4 - June 26, 2015,[/b] +1.2.3 - June 26, 2015, - Added a minified js file. - Added support for using the youtube ID as param. - License change to MPL 2.0. -[b]1.2.2 - April 05, 2015,[/b] +1.2.2 - April 05, 2015, - Force loading the oharaEmbed.css file from the default theme. - Add more options to show video preview images - Add support for previewing a message @@ -63,24 +68,25 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. - Add a setting to enable/disable the autoembed feature. This was suppose to be added a long time ago but dunno why I forgot to do it... - Missed to check the master setting. -[b]1.2.1 - March 09, 2015,[/b] +1.2.1 - March 09, 2015, - Added the option to disable the autoembed feature via $context['ohara_disable']. - Use closures instead of create_function() - Change the way youtube videos are displayed, faster pages specially with multiple videos, thanks to Infernuza for the tip. -[b]1.2 - March 05, 2014,[/b] +1.2 - March 05, 2014, - Added auto-embed feature. - Add support for old [nobbc][yt][/yt][/nobbc] tags - Add support for [nobbc][vimeo][/vimeo][/nobbc] -[b]1.1 - April 19, 2013,[/b] +1.1 - April 19, 2013, - Fix the http/https url issue. - Fixed the parsing smiles after a video issue. - Fixed the pass by reference issue. - Updated the regex to include more valid urls. -[b]1.0.1 - Dic 28, 2011,[/b] +1.0.1 - Dic 28, 2011, -Fix the youtube redirect page error if you use the initial tag alone: [youtube] -[b]1.0 - Sep 25, 2011,[/b] +1.0 - Sep 25, 2011, -Initial Release +[/code] \ No newline at end of file