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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Working Gallery Plugin for SS 3


Go to End


106 Posts   30343 Views

Avatar
Wezzlee

Community Member, 28 Posts

31 October 2012 at 7:19am

Edited: 08/11/2012 8:58am

Hi Jon,

I have tried what you suggested, but somehow the images are not displayed and the <div id="galleryArea">... </div> is also not displayed in the source code. I did a new install again. Installed the 3 files in the correct order. Added a page, uploaded a few images as a bulk upload and again this works perfectly, but the page does not show one of the uploaded images :(.

I am running the test website on a local install on my Mac, but I guess this should not make a difference. Any idea?

Module works now. Did a clean install again.

Cheers,

Wesley

Avatar
Optic Blaze

Community Member, 190 Posts

5 November 2012 at 3:16am

Hi All,

I have been working on the image gallery module that Futureweb started and combined it with Nicolaas Francken's 'basic image gallery' that was built for silverstripe 2.4. It utilizes the sortable grid field that Thierry Francois (Colymba) created.

I liked the idea of the Bulk Image uploader but did not like that all my photos got put in one big folder. I though Nicolaas' solution was quite elegant.

This version of the module now works as follows:

1) Upload images to a folder in your file store
2) Create your image gallery and select the folder in the filestore where your images are situated
3) Hit save and publish and wham! you have a image gallery.
4) It takes the names of the jpegs etc and automatically makes that your image's Title
5) Works with prettyPhoto jquery plugin
6) Allows for drag and drop reordering
7) Allows for album description
8) Allows for full description of image

@Futureweb ... would be nice if we somehow edit the descriptions etc in bulk...i have no idea how to do this.

Cheers

Attached Files
Avatar
Optic Blaze

Community Member, 190 Posts

15 January 2013 at 11:40pm

Hi there,

I have made some changes to my image gallery module. You can check it out on:

https://github.com/OpticBlaze/ss3Gallery

Let me know what you think. Any suggestions will be welcome.

Avatar
tragicGlory

Community Member, 2 Posts

15 February 2013 at 6:46am

Couple of questions with this. How do I modify the size of the thumbnails and other items? Also, is it possible to put the gallery into an existing page like it fits into a separate div? I'm a newb, so be gentle :p

Avatar
wilsonStaff

Community Member, 143 Posts

18 February 2013 at 11:53am

Hi to all, i have this:

<% control getGalleryImages %>
<% control Image.SetWidth(928) %>
<img src="$Link" alt="$Description" />
<% end_control %>
<% end_control %>

Works fine. But i cant get the alt tag to return $Description. Oddly, this works!

<img src="$Link" alt="$Title" />

but it returns file-name which obviously isnt what i need.

- -

I might add i am NOT using PrettyPhoto but Fotorama, which used the alt tag. To test i tried this:

<img src="$Link" alt="$Description TEST" />

It shows TEST but not $Description.

Any clue?

Thanks!

Avatar
Optic Blaze

Community Member, 190 Posts

18 February 2013 at 12:41pm

Hi there,

I had the same problem with pretty photo. If you look closely you are busy trying to call the $Description of the $Image control and not of the $getGalleryImages control. $Image does not have a description. To fix this i did the following in pretty photo:

<% control getGalleryImages %>
<li class="$EvenOdd $FirstLast IGE{$Pos} galentries">
<a href="$Image.URL" rel="prettyPhoto[gallery1]" title="$Description.XML">

<% control Image.SetWidth(150) %>
<img src="$Link"
<% end_control %>
alt="$Title"/>

</a></li>
<% end_control %>

Avatar
wilsonStaff

Community Member, 143 Posts

18 February 2013 at 5:13pm

To fix this i did the following in pretty photo:

Well, told you i am NOT using Pretty Photo.... so that is irrelevent.

I dont get it. $Description isnt part of Pretty Photo but part of SS3Gallery.

Why doest it accept $Title and $Link and not $Description ????

Thanks!

Avatar
wilsonStaff

Community Member, 143 Posts

18 February 2013 at 5:33pm

Ive succeeded using this

<% control getGalleryImages %>
<div style="position:absolute; top:0; left:0; z-index:100000">$Description</div>
<% control Image.SetWidth(928) %>
<img src="$Link" alt="$Title" />
<% end_control %>
<% end_control %>

Problem is that i can only see $Description only briefly. There is an z-index issue with Fotorama.

If i could get to position that div correctly, i am out of it! :-)