mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-11 01:33:51 -04:00
Allow users to upscale images in the slideshow by making the maxScale
parameter configurable in Admin > Settings > Advanced. You specify the scaling factor. Normally, images fill the stage; 0 -> never scale up; any other positive number S --> scale up to S times the original size of the photo (but never bigger than the stage)
This commit is contained in:
@@ -31,31 +31,34 @@ class slideshow_event_Core {
|
||||
}
|
||||
|
||||
static function album_menu($menu, $theme) {
|
||||
$max_scale = module::get_var("slideshow", "max_scale");
|
||||
if ($theme->item()->descendants_count(array(array("type", "=", "photo")))) {
|
||||
$menu->append(Menu::factory("link")
|
||||
->id("slideshow")
|
||||
->label(t("View slideshow"))
|
||||
->url("javascript:cooliris.embed.show(" .
|
||||
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
|
||||
"{maxScale:$max_scale,feed:'" . self::_feed_url($theme) . "'})")
|
||||
->css_id("g-slideshow-link"));
|
||||
}
|
||||
}
|
||||
|
||||
static function photo_menu($menu, $theme) {
|
||||
$max_scale = module::get_var("slideshow", "max_scale");
|
||||
$menu->append(Menu::factory("link")
|
||||
->id("slideshow")
|
||||
->label(t("View slideshow"))
|
||||
->url("javascript:cooliris.embed.show(" .
|
||||
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
|
||||
"{maxScale:$max_scale,feed:'" . self::_feed_url($theme) . "'})")
|
||||
->css_id("g-slideshow-link"));
|
||||
}
|
||||
|
||||
static function tag_menu($menu, $theme) {
|
||||
$max_scale = module::get_var("slideshow", "max_scale");
|
||||
$menu->append(Menu::factory("link")
|
||||
->id("slideshow")
|
||||
->label(t("View slideshow"))
|
||||
->url("javascript:cooliris.embed.show(" .
|
||||
"{maxScale:0,feed:'" . self::_feed_url($theme) . "'})")
|
||||
"{maxScale:$max_scale,feed:'" . self::_feed_url($theme) . "'})")
|
||||
->css_id("g-slideshow-link"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user