1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Improve SEO descriptions and title

This commit is contained in:
DanieL 2022-06-20 11:45:13 -03:00
parent 25568bc494
commit d15a9b4fc4
3 changed files with 7 additions and 5 deletions

View file

@ -45,7 +45,7 @@ if (!empty($images->posterPortrait) && basename($images->posterPortrait) !== 'no
$twitter_site = $advancedCustom->twitter_site;
$title = getSEOTitle($video['title']);
$description = getSEODescription($video['description']);
$ogURL = Video::getLinkToVideo($videos_id);
$ogURL = Video::getLinkToVideo($videos_id, '', false,false);
?>
<link rel="image_src" href="<?php echo $img; ?>" />
<meta property="og:image" content="<?php echo $img; ?>" />
@ -129,7 +129,7 @@ if (!empty($advancedCustom->twitter_player)) {
}
?>
<meta name="twitter:site" content="<?php echo $twitter_site; ?>" />
<meta name="twitter:url" content="<?php echo Video::getLinkToVideo($videos_id); ?>"/>
<meta name="twitter:url" content="<?php echo $ogURL; ?>"/>
<meta name="twitter:title" content="<?php echo $title; ?>"/>
<meta name="twitter:description" content="<?php echo $description; ?>"/>
<meta name="twitter:image" content="<?php echo $img; ?>"/>

View file

@ -8,7 +8,8 @@ if (!empty($images->posterPortrait) && strpos($images->posterPortrait, 'notfound
}
$imgw = 1280;
$imgh = 720;
$metaDescription = $title = str_replace('"', '', $video['title']);
$metaDescription = $title = getSEOTitle($video['title']);
$ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false,false);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
@ -19,7 +20,7 @@ $metaDescription = $title = str_replace('"', '', $video['title']);
?>
<link rel="image_src" href="<?php echo $img; ?>" />
<meta property="fb:app_id" content="774958212660408" />
<meta property="og:url" content="<?php echo $global['webSiteRootURL'], "video/", $video['clean_title']; ?>" />
<meta property="og:url" content="<?php echo $ogURL; ?>" />
<meta property="og:type" content="video.other" />
<meta property="og:title" content="<?php echo getSEOTitle($video['title']); ?>" />
<meta property="og:description" content="<?php echo getSEODescription(!empty($custom) ? $custom : $video['title']); ?>" />

View file

@ -8,6 +8,7 @@ if (!empty($images->posterPortrait) && strpos($images->posterPortrait, 'notfound
}
$imgw = 1280;
$imgh = 720;
$ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false,false);
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
@ -18,7 +19,7 @@ $imgh = 720;
?>
<link rel="image_src" href="<?php echo $img; ?>" />
<meta property="fb:app_id" content="774958212660408" />
<meta property="og:url" content="<?php echo $global['webSiteRootURL'], "video/", $video['clean_title']; ?>" />
<meta property="og:url" content="<?php echo $ogURL; ?>" />
<meta property="og:type" content="video.other" />
<meta property="og:title" content="<?php echo getSEOTitle($video['title']); ?>" />
<meta property="og:description" content="<?php echo getSEODescription(!empty($custom) ? $custom : $video['title']); ?>" />