$nav = explode('/', $rootdir);
$nav[0] = "Foto's"; # override of root 'foto'
$title = array_pop($nav);
-$Place['title'] = implode(' ', $nav) . ': ' . $title;
+$Article->title = implode(' ', $nav) . ': ' . $title;
$link = '';
print "<h2>";
foreach ($imgs as $img) {
if ($img == "$rootdir/index.jpg") {
# cover image of current album
- $Place['image'] = "/thumb/640x/$img";
+ $Article->image = "/$img";
continue;
}
if (!is_link($img)) continue;
<html lang="nl">
<head>
<meta charset="utf-8" />
-<?php if (!empty($Place['title'])) { ?>
- <title><?= htmlspecialchars($Place['title']) ?></title>
+<?php if ($Article->title) { ?>
+ <title><?= htmlspecialchars($Article->safetitle) ?></title>
<?php } ?>
<?php if (!empty($Place['description'])) { ?>
<meta name="description" property="og:description" content="<?= strip_tags($Place['description']) ?>" />
<?php } ?>
<meta name="viewport" content="width=device-width" />
<!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script><![endif]-->
-<?php if (!empty($Place['image'])) { ?>
- <meta property="og:image" content="https://<?= $_SERVER['HTTP_HOST'] . htmlspecialchars($Place['image']) ?>" />
+<?php if ($Article->image) { ?>
+ <meta property="og:image" content="https://<?= $_SERVER['HTTP_HOST'] . '/' . htmlspecialchars($Article->thumb('640x')) ?>" />
<?php } ?>
</head>
<body>
$Place['login/name'] = $user->name ?: 'bewoner';
$Place['user'] = $user->login;
-$Place['title'] = "Login {$user->login}";
+$Article->title = "Login {$user->login}";
if ( $password = trim(@file_get_contents("{$user->dir}/.passwd")) ) {
if (substr($password, 0, 1) == '$') {
$password = NULL; // hashed
ob_clean();
require_once 'login/form.inc.php';
$Place['warn'] = $message;
- $Place['title'] = 'Inloggen';
+ $Article->title = 'Inloggen';
if (isset($_REQUEST['goto'])) {
$target = ltrim($_REQUEST['goto'], '/');
$target = new ArchiveArticle("$target.html");
if ($target->file) {
if ($target->title) {
- $Place['title'] .= ' voor ' . $target->title;
+ $Article->title .= ' voor ' . $target->title;
}
}
}
if ($page and !is_numeric($page)) {
$edit = $User && $User->admin ? htmlspecialchars(@$_GET['edit']) : NULL;
- $Place['title'] = $edit ?: $Article->title;
+ if ($edit) {
+ $Article->title = $edit;
+ }
if ($Article->file) {
$Place['description'] = $Article->teaser;
}
$Place[1] = ' <small class="date">'.$Article->date.'</small>';
print preg_replace('{(?<=<h2>)(.*?)(?=</h2>)}', ($edit ?: '\1').' [[1]]', ob_get_clean());
- if ($Article->file and $Article->image) {
- $Place['image'] = "/".$Article->thumb('600x');
- }
if ($User and $User->admin) {
$taglist = [];
foreach (glob("$Page/.tags/*") as $tagpath) {