From 01c8cdc8dd08bf859f68aaffff32fd1acf1a66ab Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 21 Nov 2008 23:55:29 +0000 Subject: Convert the carousel module to provide its block through the new api --- core/libraries/Theme.php | 1 - modules/carousel/helpers/carousel.php | 31 ----------------------- modules/carousel/helpers/carousel_block.php | 31 +++++++++++++++++++++++ modules/carousel/helpers/carousel_installer.php | 33 +++++++++++++++++++++++++ themes/default/views/sidebar.html.php | 1 + 5 files changed, 65 insertions(+), 32 deletions(-) delete mode 100644 modules/carousel/helpers/carousel.php create mode 100644 modules/carousel/helpers/carousel_block.php create mode 100644 modules/carousel/helpers/carousel_installer.php diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php index 4bd8237a..66d0d640 100644 --- a/core/libraries/Theme.php +++ b/core/libraries/Theme.php @@ -60,7 +60,6 @@ class Theme_Core { public function blocks() { /** @todo: make this data driven */ $blocks = array( - 'carousel' => carousel::block($this), 'tag' => tag::block($this), 'info' => info::block($this), 'gmaps' => gmaps::block($this), diff --git a/modules/carousel/helpers/carousel.php b/modules/carousel/helpers/carousel.php deleted file mode 100644 index 31b513c7..00000000 --- a/modules/carousel/helpers/carousel.php +++ /dev/null @@ -1,31 +0,0 @@ -id = "gCarousel"; - $block->title = "Album: {$theme->item()->title_edit}"; - $block->content = 'id = "gCarousel"; + $block->title = "Album: {$theme->item()->title_edit}"; + $block->content = '__toString(); + } +} \ No newline at end of file diff --git a/modules/carousel/helpers/carousel_installer.php b/modules/carousel/helpers/carousel_installer.php new file mode 100644 index 00000000..3f4d55b5 --- /dev/null +++ b/modules/carousel/helpers/carousel_installer.php @@ -0,0 +1,33 @@ + + blocks() as $block): ?> -- cgit v1.2.3