git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nieuws: fix relative image paths in toc
[minimedit.git]
/
foto
/
index.php
diff --git
a/foto/index.php
b/foto/index.php
index 0ce4d206aa2a4c72b2336fc8a2b7e3fae665c71d..0acd44e7ab701aa6bfb091ed5c4a96ac08221521 100644
(file)
--- a/
foto/index.php
+++ b/
foto/index.php
@@
-1,12
+1,12
@@
<?php
<?php
-$rootdir = $Page
. $Args
;
+$rootdir = $Page
->link
;
if ($User->admin('foto')) {
if ($User->admin('foto')) {
- if (
!empty($PageAccess)
) {
+ if (
$Page->restricted
) {
$access = '<span class="icon icon-locked">🔒</span> Bewoners';
$access = '<span class="icon icon-locked">🔒</span> Bewoners';
- if ($Page
Access
!= $rootdir) {
+ if ($Page
->restricted
!= $rootdir) {
$access .= sprintf(' vanaf <a href="%s">%s</a>',
$access .= sprintf(' vanaf <a href="%s">%s</a>',
- "/
$PageAccess", pathinfo($PageAccess
, PATHINFO_FILENAME)
+ "/
{$Page->restricted}", pathinfo($Page->restricted
, PATHINFO_FILENAME)
);
}
}
);
}
}
@@
-19,19
+19,19
@@
if ($User->admin('foto')) {
$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;
+$
Page->title = ($nav ? implode(' ', $nav) . ': ' : '')
. $title;
$link = '';
print "<h2>";
foreach ($nav as $i => $linktitle) {
$link = '';
print "<h2>";
foreach ($nav as $i => $linktitle) {
- $link .= '/' . ($i ? $linktitle : $Page);
+ $link .= '/' . ($i ? $linktitle : $Page
->handler
);
printf('<a href="%s">%s</a> →'."\n", $link, $linktitle);
}
print $title;
print "</h2>\n\n";
printf('<a href="%s">%s</a> →'."\n", $link, $linktitle);
}
print $title;
print "</h2>\n\n";
-if (isset($
Articl
e->raw)) {
- print $
Articl
e->raw; # page intro
+if (isset($
Pag
e->raw)) {
+ print $
Pag
e->raw; # page intro
}
function showthumb($path)
}
function showthumb($path)
@@
-67,7
+67,7
@@
if ($imgs = glob("$rootdir/*", GLOB_ONLYDIR)) {
$html = '<img src="/'.$cover.'" />';
$html .= "<figcaption>$album</figcaption>";
if (!$User->login and file_exists("$path/.private")) {
$html = '<img src="/'.$cover.'" />';
$html .= "<figcaption>$album</figcaption>";
if (!$User->login and file_exists("$path/.private")) {
- $html = '<s
trike title="bewoners">'.$html.'</strike
>';
+ $html = '<s
title="bewoners">'.$html.'</s
>';
}
$html = "<figure>$html</figure>";
}
$html = "<figure>$html</figure>";
@@
-81,7
+81,7
@@
if ($imgs = glob("$rootdir/*.jpg")) {
foreach ($imgs as $img) {
if ($img == "$rootdir/index.jpg") {
# cover image of current album
foreach ($imgs as $img) {
if ($img == "$rootdir/index.jpg") {
# cover image of current album
- $
Articl
e->image = "/$img";
+ $
Pag
e->image = "/$img";
continue;
}
if (!is_link($img)) continue;
continue;
}
if (!is_link($img)) continue;