diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-24 17:31:14 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-24 17:31:14 +0200 |
commit | 2905df527f2fbc9b426ebc89a53adc5c6cf1ee47 (patch) | |
tree | 37b6f51a28d8d77376e2bfab20294f3841e9479c | |
parent | 40ea48bdabb5b7b8c87cd3c37e12c0c24eb91014 (diff) | |
download | volse-hubzilla-2905df527f2fbc9b426ebc89a53adc5c6cf1ee47.tar.gz volse-hubzilla-2905df527f2fbc9b426ebc89a53adc5c6cf1ee47.tar.bz2 volse-hubzilla-2905df527f2fbc9b426ebc89a53adc5c6cf1ee47.zip |
fix oembed video thumb display ratio
-rw-r--r-- | include/oembed.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/oembed.php b/include/oembed.php index 2933252b3..924e61289 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, |