modifiche per eliminare il tag meta author da alcune pagine.

modifiche su metadata opengraph per gli articoli
This commit is contained in:
Riccardo Di Dato
2016-04-15 15:00:28 +02:00
parent 7f7345e327
commit 838d12c5b2
2 changed files with 12 additions and 3 deletions
+11 -2
View File
@@ -31,9 +31,16 @@ class GUIHandler {
$description = $data["description"];
}
$useAuthor = true;
$author = $conf->info->author;
if (array_key_exists("author", $data)){
$author = $data["author"];
if ($data["author"] === false){
$useAuthor = false;
$author = "";
}
else {
$author = $data["author"];
}
}
header("Content-type: text/html; charset=utf-8");
@@ -44,7 +51,9 @@ class GUIHandler {
echo "<title>$title</title>\n";
echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n";
echo "<meta name=\"description\" content=\"$description\">\n";
echo "<meta name=\"author\" content=\"$author\">\n";
if ($useAuthor){
echo "<meta name=\"author\" content=\"$author\">\n";
}
echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\">\n";
echo '<link rel="shortcut icon" href="images/favicon.ico">'."\n";
echo '<link href="http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext" rel="stylesheet" type="text/css">'."\n";
+1 -1
View File
@@ -109,7 +109,7 @@ try {
GUIHandler::redirect("index.php");
}
GUIHandler::generateHtmlHeaders(array("additionalHeaders"=>$additionalHeaders,"author"=>$articolo->about->author,"description"=>htmlentities(strip_tags($articolo->sottotitolo),ENT_QUOTES),"title"=>htmlentities(strip_tags($articolo->titolo),ENT_QUOTES)));
GUIHandler::generateHtmlHeaders(array("additionalHeaders"=>$additionalHeaders,"author"=>false,"description"=>htmlentities(strip_tags($articolo->sottotitolo),ENT_QUOTES),"title"=>htmlentities(strip_tags($articolo->titolo),ENT_QUOTES)));
?>
<!--<div class="imageOverlay" onclick="javascript:hidePreview()">
<div class="imagePreviewBefore"><img src="images/leftImage.png" /></div>