Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » ImageGallery - some issues

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 949 Views
  • zemudkram
    Avatar
    Community Member
    1 Post

    ImageGallery - some issues Link to this post

    Hi all,

    I've just installed the latest Image Gallery module (268) and I've come across some issues. I'm wondering whether they are bugs or not.

    First off, I can only select files which have a lower case .jpg extension (using linux if that matters).
    Second, I must have more than one album, or I get an error.
    Third, I must have photos in the album.
    Last, Albums cannot have capital letters in their titles (again I suspect this is a linux vs windows issue, with case-sensitive file systems being the culprit).

    I also can't have double-quotes in the captions (it causes an error), but I can understand why that is, so I don't really mind. The strings should be sanitised or escaped though.

    Any help / opinions are appreciated.

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery - some issues Link to this post

    Nice catches, Zemudkram,

    First off, I can only select files which have a lower case .jpg extension (using linux if that matters).

    ===> Checked in a new version of SWFUpload that registers both upper and lower case for each extension added.

    Second, I must have more than one album, or I get an error.

    ===> ImageGallery recently underwent an overhaul with its handling of the UI (lightbox, etc). Looks like there were a few remaining issues. Checked in a fix in the lastest rev.

    Third, I must have photos in the album.

    ===> Fixed.

    Last, Albums cannot have capital letters in their titles

    ===> I can't replicate this. On the demo site http://dataobjectmanager.carlinowebdesign.com you'll see that I have multiple albums using capital letters. Shouldn't be an OS issue. All those values are stored in the database, not in the filesystem.

    I also can't have double-quotes in the captions

    ===> Good catch. Added .EscapeXML to all captions on the templates.

    Run an update and you should get all these changes. If you're using the ZIP download, they won't get exported for another 24 hours or so.

  • jimw
    Avatar
    Community Member
    13 Posts

    Re: ImageGallery - some issues Link to this post

    I noticed 2 other issues which I fixed. One had to do with pagination and the number of photos per page. I modified ImageGallerPage.php as follows:

    public function NextGalleryItems()
    {
    if($_REQUEST['start'] > 0 && $this->MediaPerPage)
    return $this->GalleryItems($_REQUEST['start']+$this->MediaPerPage . ",".$this->MediaPerPage); /*jimw was ",999"*/

    return $this->GalleryItems($this->MediaPerPage.",".$this->MediaPerPage); /*jimw was ",999"*/

    }


    The other was a css problem (maybe just in the theme I was using), but I changed ImageGallerry.css to eliminate the bullets in front of the image:

    .gallery-layout li {float:left;padding:10px;list-style:none;margin:0;display:block;} /*jimw add display*/ <-- line 2

    #pagination-imagegallery a:visited {
    color:#0e509e; /*jimw add semi-colon*/ <-- line 48
    display:block;
    float:left;
    padding:3px 6px;
    text-decoration:none;
    }

    .album-nav li {width:48%;margin:0;padding:1%;list-style:none;display:block;} /*jimw add display*/ <-- line 66

    This is a great module. You really did a great job. Thank you.

  • UncleCheese
    Avatar
    4085 Posts

    Re: ImageGallery - some issues Link to this post

    Thanks, jimw. Have you cross-browser tested these CSS updates?

  • jimw
    Avatar
    Community Member
    13 Posts

    Re: ImageGallery - some issues Link to this post

    I tested in IE6 and IE8, as well as FF. They all seem fine, except that in IE6 there is a bullet on the album list page.

    949 Views
Page: 1
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.