mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Downloads: #2544 download meta tags. Apple-icon fix.
This commit is contained in:
@@ -227,7 +227,7 @@ if (is_array($pref['e_meta_list']))
|
|||||||
|
|
||||||
if(isset($pref['sitebutton']))
|
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";
|
echo "<link rel='apple-touch-icon' href='".$appleIcon."' />\n";
|
||||||
unset($appleIcon);
|
unset($appleIcon);
|
||||||
}
|
}
|
||||||
|
@@ -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();
|
$dlrow = $sql->fetch();
|
||||||
$sc->setVars($dlrow);
|
$sc->setVars($dlrow);
|
||||||
|
|
||||||
// $comment_edit_query = 'comment.download.'.$id;
|
$this->setMeta($dlrow);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(!defined("DL_IMAGESTYLE"))
|
if(!defined("DL_IMAGESTYLE"))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user