From 4bf486955cea9e2b67531f044c6bf34a7bc9324f Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 18 Nov 2008 19:09:24 +0000 Subject: The start of the slideshow module. Mostly framework stuff, no real implementation yet --- modules/slideshow/controllers/slideshow.php | 50 +++++++++++++++++++++++ modules/slideshow/helpers/slideshow_installer.php | 33 +++++++++++++++ modules/slideshow/views/slideshow_feed.rss.php | 20 +++++++++ 3 files changed, 103 insertions(+) create mode 100644 modules/slideshow/controllers/slideshow.php create mode 100644 modules/slideshow/helpers/slideshow_installer.php create mode 100644 modules/slideshow/views/slideshow_feed.rss.php (limited to 'modules') diff --git a/modules/slideshow/controllers/slideshow.php b/modules/slideshow/controllers/slideshow.php new file mode 100644 index 00000000..57553227 --- /dev/null +++ b/modules/slideshow/controllers/slideshow.php @@ -0,0 +1,50 @@ +input->get("offset", 0); + $children = array(); + // @todo actually fill the array + switch ($output_format) { + case "json": + print json_encode($children); + break; + case "rss": + $view = new View("slideshow_feed.rss"); + $view->item = $parent; + $view->children = $children; + break; + default: + throw new Exception("@todo Unsupported output format: $output_format"); + } + } + + /** + * Override the get_output_format. We want to restrict the check to only $_GET and set the + * default to rss. + * @return string + */ + protected function get_output_format() { + return $this->input->get("_format", "rss"); + } +} \ No newline at end of file diff --git a/modules/slideshow/helpers/slideshow_installer.php b/modules/slideshow/helpers/slideshow_installer.php new file mode 100644 index 00000000..bd8ef4fc --- /dev/null +++ b/modules/slideshow/helpers/slideshow_installer.php @@ -0,0 +1,33 @@ + +"; ?> + + + <?= $item->title ?> + id") ?> + description ?> + en-us + + + + + + + + + \ No newline at end of file -- cgit v1.2.3