1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 13:11:52 +02:00

Downloads: #2544 download meta tags. Apple-icon fix.

This commit is contained in:
Cameron 2017-03-31 14:58:22 -07:00
parent d571bd33d8
commit 3c65faf6e3
2 changed files with 23 additions and 3 deletions

View File

@ -227,7 +227,7 @@ if (is_array($pref['e_meta_list']))
if(isset($pref['sitebutton']))
{
$appleIcon = $tp->thumbUrl($pref['sitebutton'],'w=144&h=144&crop=1',true);
$appleIcon = $tp->thumbUrl($pref['sitebutton'],'w=144&h=144&crop=1',null, true);
echo "<link rel='apple-touch-icon' href='".$appleIcon."' />\n";
unset($appleIcon);
}

View File

@ -315,8 +315,26 @@ class download
}
/**
* Meta for 'view' mode..to be expanded to handle list and maincats etc.
* @param array $row
* @todo modes for different actions based on $this->qry['action']
*/
private function setMeta($row)
{
$tp = e107::getParser();
$metaImage = $tp->thumbUrl($row['download_image'], array('w'=>500), null, true);
$metaDescription = $tp->toHtml($row['download_description'],true);
define('e_PAGETITLE', $tp->toText($row['download_name']));
e107::meta('description', $tp->toText($metaDescription));
e107::meta('keywords', $row['download_keywords']);
e107::meta('og:description', $tp->toText($metaDescription));
e107::meta('og:image', $metaImage);
e107::meta('twitter:image:src', $metaImage);
}
@ -392,8 +410,10 @@ class download
$dlrow = $sql->fetch();
$sc->setVars($dlrow);
// $comment_edit_query = 'comment.download.'.$id;
$this->setMeta($dlrow);
if(!defined("DL_IMAGESTYLE"))
{