Hide SlideShow option on main gallery page

micks80

Joined: 2012-04-22
Posts: 71
Posted: Fri, 2012-05-04 23:23

Hello,

I've been viewing around but I really don't know how to remove or hide the slideshow link on my main gallery site. As there are only nested albums there is no use of this link. Does anybody have an idea?

I did find some links for Gallery 2.x but they don't apply to 3.x versions i.e. http://gallery.menalto.com/node/38738

Thanks in advance!
Mick

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7885
Posted: Fri, 2012-05-04 23:46
<? if ( $theme->item() && $theme->item()->id == item::root()->id ): ?>
      <style>#g-slideshow-link{ display: none; }</style>
<? endif ?>

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
micks80

Joined: 2012-04-22
Posts: 71
Posted: Sat, 2012-05-05 00:00

Thanks suprsidr, can you also tell which file/method that code needs to go in...

Regards,
Mick

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7885
Posted: Sat, 2012-05-05 00:02

themes/your theme/views/page.html.php just before </head> would work.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7885
Posted: Sat, 2012-05-05 22:21

In reality this should be part of the slideshow module - minislideshow module as well

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 599
Posted: Sat, 2012-05-05 22:23

agree...

 
micks80

Joined: 2012-04-22
Posts: 71
Posted: Mon, 2012-05-07 03:38

Awesome, that worked like a charm. A simple snippet of code can do wonders :)

Thanks a lot suprsidr and jnash, you guys are awesome!

Regards,
Mick

 
jnash
jnash's picture

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

I went a step further and in the file:

modules/slideshow/slideshow_event.php

I changed the following line (40) (from:

if ($theme->item()->descendants_count(array(array("type", "=", "photo")))) {

to:

if ($theme->item()->children_count(array(array("type", "=", "photo"))) > 0) {

This change causes the slideshow icon to only appear when an album contains photos... (IE: if your root album only contains albums, the link won't show)