From 6a3c06c22494aff6179cb0629ff2ec74d2129ccf Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sat, 11 Jul 2009 19:14:44 +0000 Subject: [PATCH] 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 --- includes/galleryfunctions.php | 14 ++++++-- themes/default_vertical/css/main.css | 49 ++++++++++++++++++++++++++ themes/default_vertical/theme.ini | 4 +++ themes/default_vertical/theme.php | 52 ++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 themes/default_vertical/css/main.css create mode 100644 themes/default_vertical/theme.ini create mode 100644 themes/default_vertical/theme.php diff --git a/includes/galleryfunctions.php b/includes/galleryfunctions.php index d0f7bc8..179af2d 100644 --- a/includes/galleryfunctions.php +++ b/includes/galleryfunctions.php @@ -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; diff --git a/themes/default_vertical/css/main.css b/themes/default_vertical/css/main.css new file mode 100644 index 0000000..2112630 --- /dev/null +++ b/themes/default_vertical/css/main.css @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2009 Jan Dittberner + * Jan Dittberner IT-Consulting & -Solutions + * Cottbuser Str. 1, D-01129 Dresden + * + * This file is part of the ScrollingJQueryGallery component of the + * gnuviech-server.de Websitetools + * + * ScrollingJQueryGallery is free software: you can redistribute it + * and/or modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * ScrollingJQueryGallery is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ScrollingJQueryGallery. If not, see + * . + * + * Version: $Id$ + */ +@charset "UTF-8"; + +body { + font-family:Verdana, Arial, sans-serif; +} + +#slider { + width:90px; + float:left; + margin-left:10px; + margin-right:10px; +} + +#arrup, #arrdown { + heigt:10px; +} + +#imgscroller { + height:200px; + overflow:hidden; +} + +#scrollable { + position:relative; +} \ No newline at end of file diff --git a/themes/default_vertical/theme.ini b/themes/default_vertical/theme.ini new file mode 100644 index 0000000..a62af97 --- /dev/null +++ b/themes/default_vertical/theme.ini @@ -0,0 +1,4 @@ +themename=Vertical default theme +themetype=vertical +previewsize=311 +thumbsize=90 diff --git a/themes/default_vertical/theme.php b/themes/default_vertical/theme.php new file mode 100644 index 0000000..d6a653b --- /dev/null +++ b/themes/default_vertical/theme.php @@ -0,0 +1,52 @@ + + + + +<?php echo $content['title']; ?> + + + + + + + + + + + + +
+
up
+
+
<?php echo $thumb['alt']; ?> />
+
down
+
+
' . + '%s', + $data['title'], $data['full'], $data['src'], $data['alt'], + $data['sizes']); + ?>
+
+
+ Back + Forward +
+ + \ No newline at end of file