Merge /media/sdb1/judoRepo into redesign2018

This commit is contained in:
marko
2018-07-08 11:46:02 +02:00

View File

@@ -99,6 +99,8 @@ $options = getKeyValueArray($someOptions);
foreach($anchor->getElementsByTagName('img') as $img){
$aNews['promoImg']['src'] = $img->getAttribute('src');
$aNews['promoImg']['alt'] = $img->getAttribute('alt');
$aNews['promoImg']['width'] = $img->getAttribute('width');
$aNews['promoImg']['height'] = $img->getAttribute('height');
$anchorDad->removeChild($anchor);
break;
}
@@ -128,7 +130,7 @@ $options = getKeyValueArray($someOptions);
// Für den Fall einer ampSeite müssen die imgTags angepasst werden
if( strpos( $_SERVER['ORIG_PATH_TRANSLATED'], "pages/amp" ) !== false ){
$retHtml = str_replace("<img", "<amp-img layout=\"responsive\" width=\"200\" height=\"133\"", $retHtml);
$retHtml = str_replace("<img", "<amp-img layout=\"responsive\" width=\"".($aNews['promoImg']['width']?$aNews['promoImg']['width']:"200")."\" height=\"".($aNews['promoImg']['height']?$aNews['promoImg']['height']:"133")."\"", $retHtml);
$retHtml = str_replace("/>", "></amp-img>", $retHtml);
}
}