Fix and add thread meta tags

This commit is contained in:
Xkeeper 2017-07-19 00:20:25 -07:00
parent f50d45104c
commit 4fdd16cf57
2 changed files with 27 additions and 28 deletions

View File

@ -376,15 +376,14 @@
if (filter_bool($meta['noindex']))
$metatag .= "<meta name=\"robots\" content=\"noindex,follow\" />";
if (filter_bool($meta['description']))
if (isset($meta['description']))
$metatag .= "<meta name=\"description\" content=\"{$meta['description']}\" />";
if (filter_bool($x_hacks['smallbrowse']) and false) {
$css = "";
$css = "<link rel='stylesheet' href='/mobile.css'>";
if (isset($meta['canonical'])) {
$metatag .= "<link rel='canonical' href='{$meta['canonical']}'";
}
$header1="<html><head><meta http-equiv='Content-type' content='text/html; charset=utf-8'><title>$windowtitle</title>
$header1="<html><head><meta http-equiv='Content-type' content='text/html; charset=utf-8'><meta name='viewport' content='width=device-width, initial-scale=1'><title>$windowtitle</title>
$metatag
<link rel=\"shortcut icon\" href=\"/favicon". (!$x_hacks['host'] ? rand(1,8) ."" : "" ) .".ico\" type=\"image/x-icon\">
$css
@ -540,6 +539,3 @@ piwikTracker.enableLinkTracking();
<br>
<br>E-mail: xkeeper@gmail.com
$tblend$footer");

View File

@ -56,6 +56,9 @@
}
$numposts = $sql->resultq("SELECT COUNT(*) FROM `posts` WHERE `thread` = '{$id}' AND `id` < '{$pid}'");
$page = floor($numposts / $ppp);
// Canonical page w/o ppp link (for bots)
$meta['canonical'] = "thread.php?id=$id&page=$page";
}
define('E_BADPOSTS', -1);