1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 00:41:52 +02:00

Open-graph improvements in news.

This commit is contained in:
Cameron
2021-09-24 13:08:45 -07:00
parent fb96bfba39
commit c7be6a57e8
3 changed files with 10 additions and 4 deletions

View File

@@ -4014,7 +4014,10 @@ class eResponse
protected $_render_mod = array('default' => 'default');
protected $_meta_title_separator = ' - ';
protected $_meta_name_only = array('keywords', 'viewport', 'robots'); // Keep FB happy.
protected $_meta_property_only = array('article:section', 'article:tag'); // Keep FB happy.
protected $_meta_property_only = array( // Keep FB happy.
'article:section', 'article:tag', 'article:modified_time',
'og:description', 'og:image', 'og:title',
);
protected $_meta = array();
protected $_meta_robot_types = array('noindex'=>'NoIndex', 'nofollow'=>'NoFollow','noarchive'=>'NoArchive','noimageindex'=>'NoImageIndex' );
protected $_title_separator = ' » ';

View File

@@ -1196,7 +1196,7 @@ class e_theme
);
}
e107::getDebug()->log($ret);
// e107::getDebug()->log($ret);
return $ret;
}

View File

@@ -671,8 +671,9 @@ class news_front
{
continue;
}
e107::meta('og:image',$tp->thumbUrl($mimg,'w=500',false,true) );
// e107::meta('og:image',$mimg);
e107::meta('og:image',$tp->thumbUrl($mimg,'w=1200',false,true) );
e107::meta('og:image:width', 1200);
}
}
@@ -704,6 +705,8 @@ class news_front
e107::meta('og:url',$url);
e107::meta('article:section',$news['category_name']);
e107::meta('article:modified_time', date('c', $news['news_datestamp']));
if($news['news_meta_keywords'] && !defined('META_KEYWORDS'))
{