Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Working Gallery Plugin for SS 3

Discuss all other Modules here.

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

Page: 1 2 3 4 5 6 7 8 9 10 11
Go to End
Author Topic: 8932 Views
  • Optic Blaze
    Avatar
    Community Member
    150 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    Hi there, maybe you misunderstood. My explanation was relevant because the issue is independent of pretty photo.

    The reason why it is showing the name of the file is because when you are calling $Image you are calling the title of the images that SS automatically assigns based on the name the image when uploaded. In SS3 gallery the description field is generated by the GalleryImage class and not Image class. The answer lies in how your controls are being used.

    So Try this...based on your code:

    <% control getGalleryImages %>
    <div style="position:absolute; top:0; left:0; z-index:100000">$Description</div>
    <% control Image.SetWidth(928) %> <img src="$Link" <% end_control %> alt="$Description" /> /// Alt tag is outside $Image and now uses the Description of getGalleryImages
    <% end_control %>

  • wilsonStaff
    Avatar
    Community Member
    142 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    Hi Optic Blze, that worked. No need then for the <div>. It was a test to see if i could catch the $Description outside the <% control %>

    <% control getGalleryImages %>
    <% control Image.SetWidth(928) %>
    <img src="$Link"
    <% end_control %>
    alt="$Description" /> /// Alt tag is outside $Image and now uses the Description of getGalleryImages
    <% end_control %>

    Thanks!

  • shoves
    Avatar
    Community Member
    5 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    Optic Blaze, thanks for this cool module. I'm new to SS.

    I have installed the module long with all the other requirements but all my thumbnails seems to appear below one another with a <li> bullet next to it. How do i get them to display next to one another like you did on the diving site? Also how do i get rid of the bullets?

    Appreciate your feedback.

    Andre

  • Optic Blaze
    Avatar
    Community Member
    150 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    Sounds like the <li> element is missing the following css property: list-style:none;
    You will need to post some code for me to help any further.

  • Nachos
    Avatar
    Community Member
    17 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    Thank you futureweb and Optic Blaze for your great work!

    Optic Blaze, I got your modified gallery working and showing 100x100px thumbnails. However the thumbnail images are stretched and I would like to have them cropped. Can you point me where can I change this? Thanks a lot!

  • Optic Blaze
    Avatar
    Community Member
    150 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    Hi there,

    Try something like what i have below. What it does is that it creates a box of 100px X 100px in the ul li with no overflow...so anything outside that 'container' will be hidden. Then we stretch the image to a percentage greater than the ul li box. We do this because we are not sure if the image uploaded is portrait or landscape. The landscape pics will fit fine, but the portrait ones dont always fit if we dont increase the size of the image proportionally.

    I personally prefer to have the ul li set up with a width of say 120px and a height of 100px. I have found that landscape pictures generally work better for me.

    ______________________________________________________

    #ImageGalleryEntries ul li {
       list-style:none;
       padding:0px;
       float:left;
       display:block;
       width:175px; /* this value is determined by Image.SetWidth in galleryPages.ss */
       height:150px;
       border:solid medium #F2F2F2;
       margin:1px;
       overflow:hidden;
       }

    #ImageGalleryEntries ul li img {
       width:125%;
       overflow:hidden;
    }

  • Nachos
    Avatar
    Community Member
    17 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    It worked!! Thanks a lot!!

    In case someone as noob as me wants to try that out: I set the size of the thumbnails to a width of 130px and a height of 111px. I also changed the value in Image.SetWidth (galleryPage.ss) to double size (175px=>350px) in order to get a nice resolution for the thumbnails.

    Thanks again, optic blaze!!

  • Nachos
    Avatar
    Community Member
    17 Posts

    Re: Working Gallery Plugin for SS 3 Link to this post

    Sorry to bother again, I have one more question.
    I got the feedback that the close button for the gallery is not very visible, so I put a red button into the stripe with photoshop - but I can see no effect. Did I miss something? .png attached!

    Edit: Nevermind, it was the cache of the browser - what a genius! :-/
    Thank you!

    Attached Files
    8932 Views
Page: 1 2 3 4 5 6 7 8 9 10 11
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.