Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

cwsoft-foldergallery - image gallery for SilverStripe 3


Reply


86 Posts   12621 Views

Avatar
buddybharath

Community Member, 2 Posts

15 May 2013 at 11:22pm

Hi,
Thanks for this wonderful module.

I am a passionate photographer and plan to create a photography website which gives more emphasis to photographs. I intend to use silver stripe CMS for the same as it is clean, user friendly and reduces many other tedious tasks. I am just starting out and found this gallery module helpful for setting up what I intend to do. One of the most important criteria for my website is to have unique URL for each photograph/image. But from what I have analyzed and worked out in SS/Gallery module, it does not seem to have the option to have unique URL for each image. My understanding is, this is due to Colorbox jquery lightbox. While, searching in web I had come across jLouvre (http://labs.dreamweb.sk/jlouvre#/) which seems to have what I am looking for. Could you kindly guide me if it will be possible to replace Colorbox with jLouvre and if so, steps to do so?

Thanks for your time and help.

Regards
Bharath

Avatar
cwsoft

Community Member, 57 Posts

17 May 2013 at 6:38am

Edited: 17/05/2013 6:42am

@buddybharath: from my understanding, accessing certain images via a URL is also possible with ColorBox, as shown [url=http://stackoverflow.com/questions/11711573/how-to-open-colorbox-gallery-at-specific-image-from-url]here[/url]. However one would need to add a URL handler or route to the module (some infos [url=http://maetl.net/silverstripe-url-handling]here[/url]), which ckecks if an image exists and opens up the linked page and image in ColorBox.

Have not much time actually to implement such a feature right now, but I may add it with a future release.

Cheers

Avatar
buddybharath

Community Member, 2 Posts

17 May 2013 at 11:43pm

Thank you cwsoft, will have a look at your suggestions.

Avatar
cwsoft

Community Member, 57 Posts

26 May 2013 at 5:05am

Edited: 26/05/2013 5:51am

@Joop: great you like my module.

Would you mind to share your code updates (e.g. exif-data, photoswipe), so there is a chance I can implement some of your code it with the next version for a bigger audience?

Regarding your sort issue. Image sorting is done [url=https://github.com/cwsoft/silverstripe-cwsoft-foldergallery/blob/master/cwsoft-foldergallery/code/cwsFolderGalleryPage.php#L137]here[/url].

Thought about to add swipe gestoures with colorbox from this thread now for a while:
https://github.com/jackmoore/colorbox/issues/395

Cheers

Avatar
Joop53

Community Member, 7 Posts

27 May 2013 at 1:11am

Hi,

I included two files, one with the changes and the other is my version of cwsFolderGalleryImageExtension.php.
Regarding the image sorting; I am a traditional programmer (shame) and my oop skills are limited so i can't figure out how to change the sort call.
I hope you van help?

Avatar
cwsoft

Community Member, 57 Posts

29 May 2013 at 4:47am

@Joop53: Thanks for posting your updates here in the forum.

I start to understand your issue with the ExifDate now. At the moment you have decorated the Image class with a new method called Exif(). This method can be used on an image object (e.g. inside the template), but you can't really use it for sorting due to the fact how the gallery image sort is implemented. To get this working, one would need to add an extra database column to the Image class and write the ExifDate of it's image to it.

The basics behind are explained [url=http://doc.silverstripe.org/framework/en/3.1/reference/dataextension]here[/url]. However, I have not yet tried to add an extra table to the Image class yet.

Hope this helps.

cheers

Avatar
Joop53

Community Member, 7 Posts

29 May 2013 at 7:52pm

Hi CWsoft,

Thanx for your support. I am struggling with a strange effect. Choosing different sort-options in 'settings.yml' (1,2,3) has no effect on the output (wich is wrong by default). But when I make the function 'getImageSortOption()' return an empty string or disable sort() the output is ordened by filename ( or how it was saved on disk?). The sort-order option works fine. Could you tell me if this is normal or an error.

Avatar
cwsoft

Community Member, 57 Posts

29 May 2013 at 9:42pm

Edited: 29/05/2013 9:44pm

@Joop53: Have you run ?flush=all when changing the sort order in the YML file? Guess those settings are cached to speed up things. If it still don't work with cleared cache, it is a bug I need to fix. Will check it this evening.

If no valid option is provided at all, SS3 uses a default sort order for the Fileobjects (guess its filename).

Cheers