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

ImageGallery - some issues


Go to End


5 Posts   1600 Views

Avatar
zemudkram

Community Member, 1 Post

9 September 2009 at 8:54pm

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.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 September 2009 at 2:16am

Edited: 10/09/2009 2:16am

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.

Avatar
jimw

Community Member, 13 Posts

10 September 2009 at 6:30am

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.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 September 2009 at 6:38am

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

Avatar
jimw

Community Member, 13 Posts

10 September 2009 at 7:34am

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.