1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Fixes #648 - multiple images and og:image

This commit is contained in:
Cameron 2014-06-16 14:39:37 -07:00
parent 4b14caaebc
commit 3e1f7498cc

View File

@ -1066,7 +1066,17 @@ function setNewsFrontMeta($news, $type='news')
if($news['news_thumbnail'])
{
$iurl = (substr($news['news_thumbnail'],0,3)=="{e_") ? $tp->replaceConstants($news['news_thumbnail'],'full') : SITEURL.e_IMAGE."newspost_images/".$news['news_thumbnail'];
e107::meta('og:image',$iurl);
$tmp = explode(",", $iurl);
foreach($tmp as $mimg)
{
if(substr($mimg,-8) == '.youtube')
{
continue;
}
e107::meta('og:image',$mimg);
}
}
$url = e107::getUrl()->create('news/view/item', $news,'full=1');