Slideshow icon visible at all times

geoffs

Joined: 2012-05-08
Posts: 2
Posted: Tue, 2012-05-08 02:31

Gallery 3 (3.0.3)

I've set up my gallery so that unregistered users cannot download full size images.
If a user selects the slideshow icon, the process starts but does not display any images. No images is fine and I understand why but is there a way to turn the slideshow icon off if the viewer is not a registered user?

Temporarily, I've disabled slide shows for all users.

Regards
Geoff

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2012-05-08 02:55
 
geoffs

Joined: 2012-05-08
Posts: 2
Posted: Tue, 2012-05-08 03:26

Thanks Dave,
Works to remove the icon which will do for now (I'd like registered users to still be able to view a slideshow)

Regards
Geoff

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Tue, 2012-05-08 16:26

Geoff, if you're comfortable adding/modifying code to the files, you could alter the modules/slideshow/helpers/slideshow_event.php

you could wrap an 'if' around each of the $menu->append blocks as in the following example:

    $max_scale = module::get_var("slideshow", "max_scale");
    if (identity::active_user()->id == user::guest()->id) {
      $menu->append(Menu::factory("link")
                    ->id("slideshow")
                    ->label(t("View slideshow"))
                    ->url("javascript:cooliris.embed.show(" .
                          "{maxScale:$max_scale,feed:'" . self::_feed_url($theme) . "'})")
                    ->css_id("g-slideshow-link"));
    }
  }

Note: there are three functions that would need the edits...