Scrolling jQuery Gallery
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.8KB

  1. <?php
  2. /**
  3. * @file Startseite für ScrollingJQueryGallery. Diese Datei erledigt
  4. * die Ausgabe im Browser.
  5. *
  6. * @author Jan Dittberner <jan@dittberner.info>, Jeremias Arnstadt
  7. * <douth024@googlemail.com>
  8. *
  9. * @version $Id$
  10. *
  11. * Copyright (c) 2008, 2009 Jan Dittberner
  12. * Jan Dittberner IT-Consulting & -Solutions
  13. * Cottbuser Str. 1, D-01129 Dresden
  14. *
  15. * Copyright (c) 2008 Jeremias Arnstadt
  16. *
  17. * This file is part of the ScrollingJQueryGallery component of the
  18. * gnuviech-server.de Websitetools
  19. *
  20. * ScrollingJQueryGallery is free software: you can redistribute it
  21. * and/or modify it under the terms of the GNU General Public License
  22. * as published by the Free Software Foundation, either version 3 of
  23. * the License, or (at your option) any later version.
  24. *
  25. * ScrollingJQueryGallery is distributed in the hope that it will be
  26. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  27. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  28. * GNU General Public License for more details.
  29. *
  30. * You should have received a copy of the GNU General Public License
  31. * along with ScrollingJQueryGallery. If not, see
  32. * <http://www.gnu.org/licenses/>.
  33. */
  34. $basedir = realpath(dirname(__file__));
  35. /**
  36. * Inkludiert die Funktionsbibliothek.
  37. */
  38. require($basedir . '/includes/galleryfunctions.php');
  39. /**
  40. * Name der aktuellen Galerie.
  41. */
  42. $gallery = getCurrentGallery();
  43. /**
  44. * Informationen zu den Thumbnail-Bildern der aktuellen Galerie.
  45. */
  46. $thumbinfo = getThumbNailInfo($gallery);
  47. $scripts = array($configuration['basepath'] . 'js/jquery.js',
  48. $configuration['basepath'] . 'js/jquery.colorBlend.js',
  49. $configuration['basepath'] . 'js/jquery.lightbox.js',
  50. $configuration['basepath'] . 'scripts/ourhandlers.js');
  51. $styles = array();
  52. $template = $theme->getTemplate();
  53. if ($theme->themetype == 'horizontal') {
  54. $inlinestyles = sprintf("#scrollable { width:%dpx; }\n", $thumbinfo[0]);
  55. $inlinescript = array("var themetype='horizontal';");
  56. } else {
  57. $inlinestyles = sprintf("#scrollable { height:%dpx; }\n", $thumbinfo[0]);
  58. $inlinescript = array("var themetype='vertical';");
  59. }
  60. $inlinescript[] = "var basepath='" . $configuration['basepath'] . "';";
  61. $template->assign('scripts', $scripts);
  62. $template->assign('styles', $styles);
  63. $template->assign('inlinestyle', $inlinestyles);
  64. $template->assign('inlinescript', implode("\n", $inlinescript));
  65. $template->assign('title', getGalleryTitle($thumbinfo));
  66. $template->assign('gallerylinks', getGalleryLinks());
  67. $template->assign('thumbnails', getAllThumbnails($thumbinfo));
  68. $template->assign('firstpreview', getFirstPreview($thumbinfo));
  69. $template->assign('firstdescription', getFirstDescription($thumbinfo));
  70. $template->assign('lang', 'de');
  71. $template->assign('gallery', $gallery);
  72. $theme->display();
  73. ?>