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

master
Andrew Dolgov 10 years ago
parent c68013b132
commit 299aeb3094

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

Loading…
Cancel
Save