add a default theme for vertical scrolling (fixes #53)
* includes/galleryfunctions.php: - add the theme parameter to generated gallery links if the gallery has initially been called with a theme parameter * themes/default_vertical: default vertical theme
This commit is contained in:
parent
22ad44f0a8
commit
6a3c06c224
4 changed files with 117 additions and 2 deletions
|
@ -325,10 +325,20 @@ function getGalleryLinks() {
|
|||
GLOB_ONLYDIR) as $directory) {
|
||||
$basename = basename($directory);
|
||||
if (galleryExists($basename)) {
|
||||
$url = sprintf('index.php?galleryname=%s', urlencode($basename));
|
||||
$urlparams = array();
|
||||
$urlparams['galleryname'] = $basename;
|
||||
if (array_key_exists('theme', $_GET)) {
|
||||
$urlparams['theme'] = $_GET['theme'];
|
||||
}
|
||||
$parts = array();
|
||||
foreach ($urlparams as $key => $value) {
|
||||
$parts[] = sprintf("%s=%s", $key, urlencode($value));
|
||||
}
|
||||
$url = sprintf('index.php?%s',
|
||||
implode(ini_get('arg_separator.output'), $parts));
|
||||
$retval[] = array('gallery' => $basename,
|
||||
'label' => getGalleryLabel($basename),
|
||||
'url' => $url);
|
||||
'url' => htmlspecialchars($url));
|
||||
}
|
||||
}
|
||||
return $retval;
|
||||
|
|
Reference in a new issue