Hello,
I've been viewing around and trying my very beste the whole day, but I really don't know how to remove or hide the slideshow lin on my main gallery site. As there are only nested albums there is no use of this link. Does anybody have an idea?
Thanks in advance!
Posts: 13
I agree... the slideshow option should just not show if there are no items that can be put in the slideshow.
Posts: 133
You know, I always thought this was a bit odd, showing the slideshow option on album pages and then being told you cannot view albums...
Regards Steve
Posts: 8
so is there no option to remove the link?
Posts: 565
In the Site Admin area edit your chosen Gallery Theme setup area so that Item actions only appears in the PHOTO block... That way, without any programming, your slideshow link only shows when there is a picture.
----best wishes, Robert
Posts: 383
There is a related feature request for this: http://gallery.menalto.com/sfvote/vote/1144960
You can vote for it if you want to have this implemented into gallery2. The feature is slightly different from what is suggested here, because it creates the need for the slideshow button by making the slideshow also look into subalbums.
______________________
I made a theme for G2, try it
Posts: 134
In G2 Documentation > User contributions > Mods/Patches you could have found a link to this post:
http://gallery.menalto.com/node/36939#comment-138995
The link in this post points to a modified ItemLinks.tpl file that does exactly what is requested here.
icpix, if I understand your workaround, the slideshow link is only shown on a photo page? But it can be useful to have it also on an album page, if there are photos in the album to show (so not an empty album or an album with only sub-albums).
Posts: 565
I don't mix and match. Here it's either albums OR images as there are no labels onscreen (minimalist).
Posts: 8
thanks, this worked fine.
I'll try the other suggestions later on!
Well, but what I really wanted is, to have the Element options in the side menu only if there is a photo in the gallery. Ist there any option? Because in my albums there are only subalbums or photos but never both mixed together.
Posts: 134
you'll have to modify part of the itemlinks.tpl file (see link in above post) into this:
{assign var="hasDataItems" value=0} {foreach from=$theme.children item=child} {if !$child.canContainChildren} {assign var="hasDataItems" value=1} {/if} {/foreach} {if ($hasDataItems == 1)} {foreach from=$links item=link} {if $link.moduleId == "slideshow"} <a href="{g->url params=$link.params}" class="gbAdminLink {g->linkid urlParams=$link.params}">{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a> {/foreach} {/if}Posts: 104
I love the idea of removing the "View Slideshow" link on albums that do not have any photos in them, but this also removes the "View Slideshow" link from the actual photo pages too. Is there a way to not have it remove the view slideshow from only the album pages?
Thanks!
Posts: 11
Thanks for the code peter_k, it worked like a charm.
Any chance of a simlar code for 'Add Album To Cart'?
Regards
Bluenova
Posts: 134
Bluenova, glad you liked it.
I don't have the cart module on my site, so I can't help you with that one. Try searching the forums, or start a new topic, coz in this thread your request probably will not be found (too different from original topic, although the solution migh be very similar; you could put a link in the new topic to this solution)
Peter
Posts: 104
I've updated this for Gallery 2.2 - Revision: 15342 of the ItemLinks.tpl
after the lines:
{else} {foreach from=$links item="link"}Replace the rest with this:
{if $link.moduleId == "slideshow"} {assign var="hasDataItems" value=0} {foreach from=$theme.children item=child} {if !$child.canContainChildren} {assign var="hasDataItems" value=1} {/if} {/foreach} {if ($hasDataItems == 1)} <a class="gbAdminLink {g->linkid urlParams=$link.params|default:null}" href="{g->url params=$link.params|default:null options=$link.options|default:null}"{if isset($link.script)} onclick="{$link.script}"{/if}{if isset($link.attrs)} {$link.attrs}{/if}>{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a> {/if} {else} <a class="gbAdminLink {g->linkid urlParams=$link.params|default:null}" href="{g->url params=$link.params|default:null options=$link.options|default:null}"{if isset($link.script)} onclick="{$link.script}"{/if}{if isset($link.attrs)} {$link.attrs}{/if}>{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a> {/if} {/foreach} {/if} </div> {/if}Problems:
-Unfortunately it still removes the "view slideshow" link on the actual photo pages.
-It also will not hide the "view slideshow" link if there is an album link
If anyone has found a way around these please let me know.
--
http://ChristianJamesPhoto.com
Posts: 57
How is this solved if:
Isnt that the point? To have no slideshow icon because there are no photos, only albums, and not having it on the photo pages is not the solution, too.
Posts: 70
There is no fix for this problem, yet? Some of the solutions here are really old (2005), I don't think I shall try them all out.
The most important thing to change (at least for me) seems to be to remove the "view slideshow" on the root gallery page. Is there any way to do this?
ta-ta
T.
---------------
In case you need the link to my gallery in order to answer my help requests:
revelation-of-silence DOT com SLASH gallery
Posts: 70
*bump*
After all I've read here, everyone using slideshow in Gallery2 (and that should be quite a few people) have the same problem: the "view slideshow" shows on the root level of the gallery, but doesn't work (at least in the sidebar).
Is there a way to remove that?
Thank you for your help.
---------------
In case you need the link to my gallery in order to answer my help requests:
revelation-of-silence DOT com SLASH gallery
Posts: 5
I have a code that I found here a long time ago, and it works perfectly on a Gallery 2.2.2 that I have.
But on my other Gallery (2.2.4), it does not work anymore. Not too much of a difference in versions. Strange huh?
If anyone wants to work on this code, here it is, as I also need it to work on 2.2.4.!!!
Here is the code that works on 2.2.2.
Edit /modules/core/templates/blocks/local/ItemLinks.tpl
Add the section between ------------
(without the ------ of course!)
<div class="{$class}"> {foreach from=$links item=link} -------------------------------------------------------------------------- {if $link.moduleId == "slideshow"} {assign var="hasDataItems" value=0} {foreach from=$theme.children item=child} {if !$child.canContainChildren} {assign var="hasDataItems" value=1} {/if} {/foreach} {if ($hasDataItems == 1)} <a href="{g->url params=$link.params}" class="gbAdminLink {g->linkid urlParams=$link.params}">{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a> {/if} {else} -------------------------------------------------------------------------- <a href="{g->url params=$link.params}" class="gbAdminLink {g->linkid urlParams=$link.params}">{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a> {/if} {/foreach} </div> {/if} {/if}Posts: 143
I would like a fix for this too.
Doesn't make sense for Gallery to display the "View Slideshow" on the Album level if there are no pictures there to do a Slideshow.
Posts: 4
I would also like a version for the 2.2.4
Posts: 2
Using the code shown by @grasshopper, I managed to solve this problem in 2.2.4 (works for me anyway).
Basically, this is the content of my file located here:
/modules/core/templates/blocks/local/ItemLinks.tpl
Note that the new slideshow-related code is located under the second {foreach from=$links item="link"} bit.
Hope this works for everyone else too.
{* * $Revision: 15342 $ * If you want to customize this file, do not edit it directly since future upgrades * may overwrite it. Instead, copy it into a new directory called "local" and edit that * version. Gallery will look for that file first and use it if it exists. *} {if !isset($links) && isset($theme.itemLinks)} {assign var="links" value=$theme.itemLinks} {/if} {if !empty($links)} {if empty($item)} {assign var="item" value=$theme.item} {/if} {if !isset($lowercase)} {assign var="lowercase" value=false} {/if} {if !isset($useDropdown)} {assign var="useDropdown" value=true} {/if} <div class="{$class}"> {* If more than one link and $useDropdown is true, use a dropdown. Otherwise render as links. *} {if count($links) > 1 && $useDropdown} <select onchange="var value = this.value; this.options[0].selected = true; eval(value)"> <option value=""> {if $item.canContainChildren} {g->text text="« album actions »"} {else} {g->text text="« item actions »"} {/if} </option> {foreach from=$links item="link"} <option value="{if isset($link.script)}{$link.script}{else}window.location = '{g->url params=$link.params|default:null options=$link.options|default:null}'{/if}"{if !empty($link.selected)} selected="selected"{/if}> {if $lowercase} {$link.text|lower} {else} {$link.text} {/if} </option> {/foreach} </select> {else} {foreach from=$links item="link"} {if $link.moduleId == "slideshow"} {assign var="hasDataItems" value=0} {foreach from=$theme.children item=child} {if !$child.canContainChildren} {assign var="hasDataItems" value=1} {/if} {/foreach} {if ($hasDataItems == 1)} <a href="{g->url params=$link.params}" class="gbAdminLink {g->linkid urlParams=$link.params}">{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a> {/if} {else} <a class="gbAdminLink {g->linkid urlParams=$link.params|default:null}" href="{g->url params=$link.params|default:null options=$link.options|default:null}"{if isset($link.script)} onclick="{$link.script}"{/if}{if isset($link.attrs)} {$link.attrs}{/if}>{if $lowercase}{$link.text|lower}{else}{$link.text}{/if}</a> {/if} {/foreach} {/if} </div> {/if}Posts: 143
ADeveria, you are AWESOME!!!!
It finally works on 2.2.4!!!! I also had the other code that used to work on 2.2.2 and was upset that it was not working anymore!!!
Actually, seems like your code is identical to the one posted above... what changed???
THANK YOU SO MUCH anyway!!!