af_redditimgur: gifv: fix iframe not being wide enough, fix indenting

This commit is contained in:
Andrew Dolgov 2015-05-15 08:06:18 +03:00
parent c68013b132
commit 299aeb3094

View file

@ -49,6 +49,7 @@ class Af_RedditImgur extends Plugin {
if (strpos($aentry->getAttribute("property"), "og:image:width") !== FALSE) {
$width = $aentry->getAttribute("content");
}
if (strpos($aentry->getAttribute("property"), "og:image:height") !== FALSE) {
$height = $aentry->getAttribute("content");
}
@ -61,8 +62,8 @@ class Af_RedditImgur extends Plugin {
$iframe = $doc->createElement('iframe');
$iframe->setAttribute("src", str_replace("http:", "", $entry->getAttribute("href")));
$iframe->setAttribute("frameborder", "0");
$iframe->setAttribute("width", $width);
$iframe->setAttribute("height", $height);
$iframe->setAttribute("width", $width + 64);
$iframe->setAttribute("height", $height + 64);
$br = $doc->createElement('br');
$entry->parentNode->insertBefore($iframe, $entry);