summaryrefslogtreecommitdiff
path: root/modules/carousel/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-05 05:20:20 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-05 05:20:20 +0000
commitb82332192a7420cce045612014ad6f54b02974c3 (patch)
tree7fae26a41040c0f7af6caddbfacb8c8db6250502 /modules/carousel/helpers
parentf7560a7e8b15abdd549e4c59bbb39c6416844d9e (diff)
The carousel block is now off into its own module. The
sidebar.html.php file loops over $theme->blocks() which in turn calls carousel::block() which uses the Block object to create a standard block UI. Hooray!
Diffstat (limited to 'modules/carousel/helpers')
-rw-r--r--modules/carousel/helpers/carousel.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/carousel/helpers/carousel.php b/modules/carousel/helpers/carousel.php
new file mode 100644
index 00000000..de34e1ae
--- /dev/null
+++ b/modules/carousel/helpers/carousel.php
@@ -0,0 +1,31 @@
+<?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 Carousel_Core {
+ public static function block($theme) {
+ $block = new Block();
+ $block->id = "gCarousel";
+ $block->title = "Album: <a href=#>{$theme->item()->title}</a>";
+ $block->content = '<img src="' .
+ url::base() . "modules/carousel/images/carousel.png" .
+ '" width="214"';
+ return $block;
+ }
+} \ No newline at end of file