You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB
PHP

<?php
include $root."includes/start-meta.php";
echo '<link rel="stylesheet" href="'.$root.'styles/default.css" />';
$usragent=$_SERVER['HTTP_USER_AGENT'];
if (!strpos($usragent, 'PaleMoon') !== false && (!isset($_COOKIE['scrollbar']) || $_COOKIE['scrollbar'] !== "true")) {
echo '<link rel="stylesheet" href="'.$root.'styles/noscroll.css" />';
} else {
echo '<link rel="stylesheet" href="'.$root.'styles/scroll.css" />';
}
echo '<link rel="stylesheet" href="'.$root.'styles/fonts.css" />';
echo '<meta property="og:url" content="'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http")."://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'" />';
if (isset($_GET['post']) && $_GET['post'] != 'archive') {
$ogtype = 'article';
$ogtitle = file_get_contents('./'.$_GET['post']);
$ogtitle = explode('<h1>', $ogtitle)[1];
$ogtitle = explode('</h1', $ogtitle)[0];
} else {
$ogtype = 'website';
$ogtitle = $title;
}
echo '<meta property="og:type" content="'.$ogtype.'" />';
echo '<meta property="og:title" content="'.$ogtitle.'" />';
echo '<meta property="og:image" content="/images/banner.gif" />';
echo '<meta property="og:image:type" content="image/gif" />';
echo '<meta property="og:image:width" content="240" />';
echo '<meta property="og:image:height" content="60" />';
echo '</head>';
?>