• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [SOLVED] Directly load gallery's images in slideshow
PostPosted: Thu Jun 05, 2014 9:08 am 
Offline
Power Poster
Power Poster

Joined: Sun Dec 28, 2008 12:15 pm
Posts: 448
Location: Roma, Italy
Is there a way to directly display images in the slideshow (like Lightbox, prettyPhoto etc.) when clicking on gallery's cover image?
In other words, I would load in the slideshow all the images of the gallery, without having to reload the page with all the thumbnails.

I've tried to strip the "thumb_" prefix but the slideshow doesn't display all gallery's images but the cover:
\$1:
<a href="{$image->thumb|escape:'url'|replace:'%2F':'/'|replace:'thumb_':''}" rel="prettyPhoto[{$galleryid}]" title="{$image->titlename}"><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>


thanks


Last edited by nervino on Thu Jun 05, 2014 3:56 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Directly load gallery's images in slideshow
PostPosted: Thu Jun 05, 2014 10:28 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3124
Location: The Netherlands
I do think it is possible, but depends on your needs and setup.

You want to display the 'cover' of multiple Galleries on one single page and if clicked, that gallery's images should load in some slideshow?

Like for example: https://tinyurl.com/n6hr4lz ?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Directly load gallery's images in slideshow
PostPosted: Thu Jun 05, 2014 11:02 am 
Offline
Power Poster
Power Poster

Joined: Sun Dec 28, 2008 12:15 pm
Posts: 448
Location: Roma, Italy
Thank you Velden, that's exactly what I want.
I need to achieve the same result of your example.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Directly load gallery's images in slideshow
PostPosted: Thu Jun 05, 2014 11:54 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3124
Location: The Netherlands
Ok, let me post my templates so you can have a look if it works for you:

Gallery template 'gallerytree' (= DEFAULT!)

\$1:
{foreach from=$images item=image name=img}
<div class="{if $smarty.foreach.img.index > 0}hide{else}item{foreach from=$fields item=f key=fieldalias}{if $f.value} {$fieldalias}{/if}{/foreach}{/if}"><a class="fancybox" rel="gallery{$galleryid}" href="{root_url}/{$image->file}" title=""><div style="display:none" class="galtitle"><b>{$image->title}</b><br />{$gallerycomment}</div>
{if $smarty.foreach.img.index == 0}<img src="{root_url}/{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="" />{/if}</a>{if $smarty.foreach.img.index == 0}<p>{$gallerytitle}</p>{/if}</div>
{*assign var='g_prevdepth' value=$image->depth*}
{/foreach}


Gallery template 'gallerytree2'

\$1:
{assign var="org_gallerydir" value=$gallerydir}
{foreach from=$images item=image name=img}
{Gallery dir="$org_gallerydir/`$image->filename`"}
{/foreach}


Gallery call from template or content:
\$1:
{Gallery template="gallerytree2"}


Note that 'Gallery' should only contain sub-galleries (one level) and that 'Gallery' itself should NOT contain images. Template above does NOT check that.

Rest is javascript / css stuff.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Directly load gallery's images in slideshow
PostPosted: Thu Jun 05, 2014 3:56 pm 
Offline
Power Poster
Power Poster

Joined: Sun Dec 28, 2008 12:15 pm
Posts: 448
Location: Roma, Italy
Thank you very much, it works!

Cheers


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: googlebot


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting