git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: prefer meta description as article teaser
[minimedit.git]
/
foto
/
index.php
diff --git
a/foto/index.php
b/foto/index.php
index cd939f3ab2e5e92ba73fbeff02dc0946ef24952a..358ef942aae9bf492c13358ad22b6cb685fbd4c1 100644
(file)
--- a/
foto/index.php
+++ b/
foto/index.php
@@
-3,7
+3,7
@@
$intro = ob_get_clean();
$rootdir = $Page . $Args;
$rootdir = $Page . $Args;
-if (
!empty($User['admin'])
) {
+if (
$User and $User->admin
) {
$access = '🔓 Openbaar';
if (isset($PageAccess)) {
$access = "🔒 Bewoners";
$access = '🔓 Openbaar';
if (isset($PageAccess)) {
$access = "🔒 Bewoners";
@@
-19,6
+19,7
@@
if (!empty($User['admin'])) {
$nav = explode('/', $rootdir);
$nav[0] = "Foto's"; # override of root 'foto'
$title = array_pop($nav);
$nav = explode('/', $rootdir);
$nav[0] = "Foto's"; # override of root 'foto'
$title = array_pop($nav);
+$Article->title = implode(' ', $nav) . ': ' . $title;
$link = '';
print "<h2>";
$link = '';
print "<h2>";
@@
-76,7
+77,11
@@
if ($imgs = glob("$rootdir/*", GLOB_ONLYDIR)) {
if ($imgs = glob("$rootdir/*.jpg")) {
print '<ul class="gallery album">'."\n";
foreach ($imgs as $img) {
if ($imgs = glob("$rootdir/*.jpg")) {
print '<ul class="gallery album">'."\n";
foreach ($imgs as $img) {
- if ($img == "$rootdir/index.jpg") continue;
+ if ($img == "$rootdir/index.jpg") {
+ # cover image of current album
+ $Article->image = "/$img";
+ continue;
+ }
if (!is_link($img)) continue;
print '<li>'.showthumb($img);
}
if (!is_link($img)) continue;
print '<li>'.showthumb($img);
}