summaryrefslogtreecommitdiff
path: root/modules/slideshow/helpers/slideshow_event.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/slideshow/helpers/slideshow_event.php')
-rw-r--r--modules/slideshow/helpers/slideshow_event.php51
1 files changed, 18 insertions, 33 deletions
diff --git a/modules/slideshow/helpers/slideshow_event.php b/modules/slideshow/helpers/slideshow_event.php
index cf79f71a..926b4da1 100644
--- a/modules/slideshow/helpers/slideshow_event.php
+++ b/modules/slideshow/helpers/slideshow_event.php
@@ -18,45 +18,30 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class slideshow_event_Core {
- static function module_change($changes) {
- if (!module::is_active("rss") || in_array("rss", $changes->deactivate)) {
- site_status::warning(
- t("The Slideshow module requires the RSS module. " .
- "<a href=\"%url\">Activate the RSS module now</a>",
- array("url" => url::site("admin/modules"))),
- "slideshow_needs_rss");
- } else {
- site_status::clear("slideshow_needs_rss");
- }
- }
-
static function album_menu($menu, $theme) {
- $menu
- ->append(Menu::factory("link")
- ->id("slideshow")
- ->label(t("View slideshow"))
- ->url("javascript:PicLensLite.start(" .
- "{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
- ->css_id("gSlideshowLink"));
+ $item = $theme->item();
+ $menu->append(Menu::factory("link")
+ ->id("slideshow")
+ ->label(t("View slideshow"))
+ ->url(url::site("slideshow/album/{$item->id}"))
+ ->css_id("gSlideshowLink"));
}
static function photo_menu($menu, $theme) {
- $menu
- ->append(Menu::factory("link")
- ->id("slideshow")
- ->label(t("View slideshow"))
- ->url("javascript:PicLensLite.start(" .
- "{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
- ->css_id("gSlideshowLink"));
+ $item = $theme->item();
+ $menu->append(Menu::factory("link")
+ ->id("slideshow")
+ ->label(t("View slideshow"))
+ ->url(url::site("slideshow/photo/{$item->id}"))
+ ->css_id("gSlideshowLink"));
}
static function tag_menu($menu, $theme) {
- $menu
- ->append(Menu::factory("link")
- ->id("slideshow")
- ->label(t("View slideshow"))
- ->url("javascript:PicLensLite.start(" .
- "{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
- ->css_id("gSlideshowLink"));
+ $tag = $theme->tag();
+ $menu->append(Menu::factory("link")
+ ->id("slideshow")
+ ->label(t("View slideshow"))
+ ->url(url::site("slideshow/tag/{$tag->id}"))
+ ->css_id("gSlideshowLink"));
}
}