[SOLVED]Gallery-module: Link to original (not resized) file?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am
Location: Finland

[SOLVED]Gallery-module: Link to original (not resized) file?

Post by urheat »

Is there a way to use Gallery module to show links to original (not resized) pictures?

It would be nice if a user could browse images and when the right image is founded, there would be a download link to the original not resized image file (like press photo).
Last edited by urheat on Sat Aug 13, 2011 7:58 am, edited 1 time in total.
Jos
Support Guru
Support Guru
Posts: 4017
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Gallery-module: Link to original (not resized) image fil

Post by Jos »

Sure... I guess adding a link is quite the same as adding a comment:
http://wiki.cmsmadesimple.org/index.php ... _Questions
Foaly*
Translator
Translator
Posts: 150
Joined: Sun Mar 29, 2009 3:32 pm
Location: London

Re: Gallery-module: Link to original (not resized) image fil

Post by Foaly* »

{$image->file} is the not resized image whereas {$image->thumb} is the resized one.
Jos
Support Guru
Support Guru
Posts: 4017
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Gallery-module: Link to original (not resized) image fil

Post by Jos »

I assumed urheat wanted a link to an even bigger image then the usual {$image->file}
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am
Location: Finland

Re: Gallery-module: Link to original (not resized) image fil

Post by urheat »

Foaly* wrote:{$image->file} is the not resized image whereas {$image->thumb} is the resized one.
Thanks to both of you :)

But if I understood correctly, Gallery Module uploads two photos: thumbnail and resized one. Both for browsing. I think I need three: thumbnail, resized one (like 1024x768) and press photo = original file (something like 3000x1800).
Foaly*
Translator
Translator
Posts: 150
Joined: Sun Mar 29, 2009 3:32 pm
Location: London

Re: Gallery-module: Link to original (not resized) image fil

Post by Foaly* »

Upload your photo in 3000x1800 and use CGSmartImage to resize it to 1024x768.
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am
Location: Finland

Re: Gallery-module: Link to original (not resized) image fil

Post by urheat »

Foaly* wrote:Upload your photo in 3000x1800 and use CGSmartImage to resize it to 1024x768.
This sounds promising. But how this can be done? The template of the gallery is JavaScript-file (like lytebox.js) and I can't put CMS tags there..?
Jos
Support Guru
Support Guru
Posts: 4017
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Gallery-module: Link to original (not resized) image fil

Post by Jos »

You can put CGSmartImage or SuperSizer tags in the Gallery templates. Check the help of the plugin of your choice to learn how.

But... does your webserver have enough recources to resize images of 3000x1800 px? (memory_limit, executiontime)
Mantlet
Forum Members
Forum Members
Posts: 114
Joined: Fri Apr 28, 2006 9:42 am
Location: Haarlem - Netherlands

Re: Gallery-module: Link to original (not resized) image fil

Post by Mantlet »

I recently did something similar here: http://www.sonrisefoto.nl/

This is just iframed into another website that needed a photoalbum fast. So that explaines the empty look of the template.

What urheat probably wants, is the link to the original to be in the fancybox. So that people can browse and click original from the medium sized image that is showing in fancybox.

I didn't get that, because the fancybox code is beyond my reach in CMSMS.

To get the medium picture I used CGSmartImage with the following code:

Code: Select all

<a class="group" href="{CGSmartImage src=$image->file|escape:'url'|replace:'%2F':'/' filter_resize='h,600' notag=1 noembed=1}" title="{$image->titlename}" rel="gallery-{$galleryid}" onClick="javascript: pageTracker._trackPageview('{$image->file|escape:'url'|replace:'%2F':'/'}'); "><img src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a><br/>
urheat
Forum Members
Forum Members
Posts: 243
Joined: Sat Oct 17, 2009 6:50 am
Location: Finland

Re: Gallery-module: Link to original (not resized) image fil

Post by urheat »

I managed to solve my problem easily with Mantlet's code. Thanks :)
Post Reply

Return to “Modules/Add-Ons”