diff options
-rw-r--r-- | modules/slideshow/helpers/slideshow.php | 28 | ||||
-rw-r--r-- | themes/default/views/album.html.php | 4 | ||||
-rw-r--r-- | themes/default/views/photo.html.php | 4 |
3 files changed, 34 insertions, 2 deletions
diff --git a/modules/slideshow/helpers/slideshow.php b/modules/slideshow/helpers/slideshow.php new file mode 100644 index 00000000..fdd696d2 --- /dev/null +++ b/modules/slideshow/helpers/slideshow.php @@ -0,0 +1,28 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * This program 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 2 of the License, or (at + * your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class slideshow { + public static function link() { + return "javascript:PicLensLite.start()"; + } + + public static function button_text() { + return _("Slideshow"); + } +} diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php index 87b7fbff..f55f2056 100644 --- a/themes/default/views/album.html.php +++ b/themes/default/views/album.html.php @@ -2,7 +2,9 @@ <div id="gAlbumHeader"> <h1><?= $item->title_edit ?></h1> <span class="gUnderState"><?= $item->description_edit ?></span> - <a href="javascript:PicLensLite.start()" id="gSlideshowLink" class="gButtonLink">Slideshow</a> + <? if ($theme->module("slideshow")): ?> + <a href="<?= slideshow::link() ?>" id="gSlideshowLink" class="gButtonLink"><?= slideshow::button_text()?></a> + <? endif; ?> </div> <ul id="gAlbumGrid"> diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index 5843b3ac..ed97be88 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -1,7 +1,9 @@ <? defined("SYSPATH") or die("No direct script access."); ?> <div id="gItem"> <a href="" class="gButtonLink">Full size (1024x768)</a> - <a href="javascript:PicLensLite.start()" id="gSlideshowLink" class="gButtonLink">Slideshow</a> + <? if ($theme->module("slideshow")): ?> + <a href="<?= slideshow::link() ?>" id="gSlideshowLink" class="gButtonLink"><?= slideshow::button_text()?></a> + <? endif; ?> <img id="gPhotoID-<?= $item->id ?>" alt="photo" src="<?= $item->resize_url() ?>" width="<?= $item->resize_width ?>" |