From 2905df527f2fbc9b426ebc89a53adc5c6cf1ee47 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 24 Oct 2011 17:31:14 +0200 Subject: [PATCH] fix oembed video thumb display ratio --- include/oembed.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/oembed.php b/include/oembed.php index 2933252b3e..924e61289e 100644 --- a/include/oembed.php +++ b/include/oembed.php @@ -56,9 +56,11 @@ function oembed_format_object($j){ switch ($j->type) { case "video": { if (isset($j->thumbnail_url)) { - /*$tw = (isset($j->thumbnail_width)) ? $j->thumbnail_width:200; - $th = (isset($j->thumbnail_height)) ? $j->thumbnail_height:180;*/ - $tw=150; $th=120; + $tw = (isset($j->thumbnail_width)) ? $j->thumbnail_width:200; + $th = (isset($j->thumbnail_height)) ? $j->thumbnail_height:180; + $tr = $tw/$th; + + $th=120; $tw = $th*$tr; $tpl=get_markup_template('oembed_video.tpl'); $ret.=replace_macros($tpl, array( '$embedurl'=>$embedurl,