diff --git a/core/config/config.php b/core/config/config.php index 3a81f112..2791bd76 100644 --- a/core/config/config.php +++ b/core/config/config.php @@ -129,6 +129,6 @@ $config['modules'] = array MODPATH . 'user', MODPATH . 'info', MODPATH . 'gmaps', - MODPATH . 'auth', + MODPATH . 'slideshow', MODPATH . 'comment', ); 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 diff --git a/themes/default/js/slideshow.js b/themes/default/js/slideshow.js new file mode 100644 index 00000000..35f792b8 --- /dev/null +++ b/themes/default/js/slideshow.js @@ -0,0 +1,3 @@ +function slideshow(parent_id) { + alert("Start a slideshow showing all the items that have the id " + parent_id + " as a descendent"); +} \ No newline at end of file diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php index b59dba01..b2617998 100644 --- a/themes/default/views/album.html.php +++ b/themes/default/views/album.html.php @@ -2,7 +2,7 @@

title_edit ?>

description_edit ?> - Slideshow + Slideshow