Slideshow module development
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Hi all-- Quote:
Bob is viewing an album with many images in it and paging through the resized images one at a time. He decides that he wants to have G2 flip through all the images for him instead of having to page through them himself. He clicks the "slideshow" button and is taken to a new page that starts with the current image and starts paging through the images 15 seconds at a time. The slideshow gets to the end and starts over from the beginning so he clicks the "stop" button and is returned to the normal view where he is now viewing the last image he saw in the slideshow. I will commit the code later today, along with the unit test. |
|
fedak
![]()
Joined: 2003-12-14
Posts: 80 |
![]() |
> I will commit the code later today, along with the unit test. Code, unit test, and module all working on my machine. Looks good so far! -fedak |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Great, thanks Fedak. The second iteration will cover this user story: Quote:
While Bob is viewing the slideshow he decides that he wants to see more information about the images that he's viewing so he clicks the "show more info" button. Now he can see the title, summary, description and capture date of the photo. The slideshow continues, uninterrupted. Bob gets tired of viewing the extra information and clicks the "hide more info" button and the extra information goes away. The slideshow continues, uninterrupted. |
|
jrusch
Joined: 2003-06-10
Posts: 8 |
![]() |
Thanks for working on this. If I may, I have some requests that would make G2 *really* useful for faculty here at UC Berkeley as they use Gallery to project images in class, and for students as they are studying. Do with these as you see fit. 1. The ability to hide the navigation during the slide show, except for play/pause and next/previous buttons, creating a nice blank backdrop for the images to appear against. (I'd choose black.) 2. The ability to show two slides side by side. with independent control of the start stop for each, mimicking what professors do with traditional dual slide projectors (esp. in Art History). This would mean instructors could actually project their G2 web sites in class! (A few Art History professors here are using G1 already for course web sites.) 3. The feature of turning data display on and off would be great, esp. if you could choose which fields to show. At Berkeley, we are putting in lots of official metadata, adding library-type fields, etc. so being able to turn most of those off, leaving, say Title, Author, Period, Location and Work Date, for example, would be killer. 4. If you could turn the data off, on the fly, while the slide show is playing, then students studying the slides could use it to quiz themselves by guessing and then popping up the data on the screen. in G1, they have to go back to the Gallery page to see any data beyond caption. These uses may be esoteric to the general audience, but if you did them I think G2 would start being adopted at universities across the country. I'd also personally make sure that UC gave generously to Gallery! Thanks! Jeff |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Thanks for the input, Jeff. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Hi all- Bharat- $useExif = 0; list ($ret, $exif) = $gallery->loadModule('exif'); if (!$ret->isError()) { list ($ret, $active) = $exif->isActive(); if (!$ret->isError() && $active) { $useExif = 1; } } ie, if I can load the module and it is active then I will use the module later on.. |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Cross module interaction should be governed by interfaces, with It'd look something like this. In the EXIF module: class ExifInterface1_0 { /** * @param array property names ('DateTime', 'ISO', etc) * @return array object GalleryStatus a status code * values ('DateTime' => '...', 'ISO' => '...') */ function getProperty($properties) { return array(GalleryStatus::error(ERROR_UNIMPLEMENTED, __FILE__, __LINE__), null); } } Then we define an implementation: class ExifExtractor extends ExifInterface1_0 { function getProperty($properties) { // Do the actual work here } } Then we register it like this: GalleryFactory::registerImplementation('ExifInterface1_0', 'ExifExtractor', 'ExifExtractor', '/path/to/ExifExtractor.class'); Then if we want to get EXIF data from anywhere in the system we can do this: list ($ret, $exif) = GalleryFactory::newInstance('ExifInterface1_0'); if ($ret->isError()) { ... } if (isset($exif)) { list ($ret, $captureDate) = $exif->getProperty('CaptureDate'); }
GalleryFactory::newInstance() normally expects us to provide a second The obvious advantage of this technique is that it detaches EXIF I also was thinking along the lines of using a similar interface when Thoughts? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Ok, I will add ExifInterface so slideshow can request Capture Date data. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Interface complete.. 2nd user story now finished. Next user story: Quote:
One of the images catches Bob's eye, so he hits the "pause" button and the slideshow stops temporarily. He hits resume and the slideshow continues. He then decides that he wants to see it again so he hits the "back one image" button again and the image reappears. He hits the stop button and it freezes on this image. Then he hits the "play" button and play resumes. Bharat, the last two sentences here introduce inconsistencies.. I will assume you meant "pause" and "resume" instead of "stop" and "play" in those sentences. |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
Oops, yes I did mean to say "pause" and "resume". I'm sure there are other little inconsistencies in the user stories like this so you should use your judgement. We'll replace all the text with VCR style icons eventually, too so the exact naming isn't as relevant in the final analysis. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Here's the next user story: Quote:
The images in the album Bob is viewing has a variety of resizes and they aren't all the same size. He selects 800x600 from the "desired size" menu and the slideshow continues uninterrupted, but now all the images being displayed are as close to 800x600 as possible. This brings up the question of how the user controls for "size" should work. Here are my initial ideas: |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
mindless wrote:
Here's the next user story: I was envisioning a dropdown containing the standard choices like you list above. I agree that the dropdown won't make sense in all cases, but it should hit the 80% case where most people have intermediate resized versions of the images. The default would be 640x480 or 800x600 but we could have a pretty large range of choices, eg:
Or perhaps it's just confusing to the end user to list the numbers and we should just have:
Where we map those to sizes internally but don't show the sizes to the users. I was thinking that the algorithm would be that we try to find the nearest resize derivative that is smaller than the chosen dimensions so that in most cases the use will not have to scroll around to see the image. Failing that, we take the nearest larger resize derivative. Failing that, we use the original (or the preferred derivative). What do you think?[/] [/] |
|
ajs279
Joined: 2002-09-01
Posts: 23 |
![]() |
mindless wrote:
Thanks for the input, Jeff. I've been thinking for a long time now how to create a full size screen saver with the images from Gallery. Your slideshow listed here is a step in that direction. Was thinking about hooking a full size slideshow up to something in the ActiveDesktop. Does your full screen slideshow work with v1.4.x? The broadband users of my Gallery would love it! |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
ajs279 wrote:
I've been thinking for a long time now how to create a full size screen saver with the images from Gallery. Your slideshow listed here is a step in that direction. Was thinking about hooking a full size slideshow up to something in the ActiveDesktop. Yes, the link I gave is to my 1.4.1 install. You can find the full details of this patch at: |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Bharat- |
|
Aylwin
![]()
Joined: 2003-09-16
Posts: 24 |
![]() |
Sorry for the interruption. I've made the patch for slideshow_popup and it works fine. I'm having trouble changing the background color of the popup window to black though. I only want it for the popup window so I've tried changing $bgcolor and background-color in slideshow_popup.php to black but there's no effect. If you have some time, I'd appreciate some advice. Thanks! [edit] By the way, I absolutely love the popup slideshow! Well done! |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Aylwin, thanks! I've now committed G2 slideshow code with a size-selector. Included code to rebuild any derivatives that need it to ensure width/height are known (a problem I mentioned in a previous post, now solved). |
|
Aylwin
![]()
Joined: 2003-09-16
Posts: 24 |
![]() |
Size-selector. You mean for the popup window? That would be really cool! For my purposes, I don't like fullscreen. Right now, I've made my popup window 640 x 530 (480+50). My users aren't very computer savvy so I think the fullscreen might confuse them. The non-fullscreen popup window has the "X" at the top right corner so they can easily close the window. Also, many of them still use 800 x 600 screen resolution so I feel the smaller window size is better for them. I also made a few other tweaks: 1) black background, white text (as you already know) - For me, pictures show better against a plain black background. I think it would be nice to have this user configurable in case they want to override their theme. 2) toolbar always shown - first, because of my users I feel that mouse over and stuff like that will just confuse them. Second, since the window size is small, photo resize to fit the window is very likely and I find it annoying that the photo will again resize whenever the toolbar is shown or hidden. Again, I recommend this be a user option. 3) minor position adjustments to the toolbar - I just think it looks better with the following: padding-left:10px; padding-right:3px; padding-top:5px; These suggestions are just my personal preferences that suit my needs and taste. I trust that you guys know best what the needs are for the majority. Another thing I've been thinking about is to make the popup window resizeable. This way, users with different screen resolutions could decide for themselves what size they want. I haven't tested it yet though because it's not that useful for me. All my photos are no larger than 640 x 640. Anyway, great job so far! I was really happy when the slideshow feature came out and I think popup takes it to the next level! :D |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Recent updates: Probably the next thing I'll look at is recursive slideshow (include subalbums). |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
we want 1 or 0 seconds delay! |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
valiant, so far nothing is configurable, but I'll get there. |
|
jrusch
Joined: 2003-06-10
Posts: 8 |
![]() |
mindless wrote:
Two slides at once is something I hadn't considered.. how would that work? Would each photo come from the same or different albums? Sorry I didn't get back to you until now. Thanks for the interest! In thinking about it, I realize my request is not really a slideshow request per se, but it would fit better as a modification to slideshow than anywhere else. The reason is that for lectures, instructors would really use the forward/backward arrows of the regular Gallery view more than the play/pause of slideshow. But at the same time, I like slideshow for it's ability to get rid of all the navigation and present a simple screen, with the ability to mouseover a show/hide of metadata that you already showed me (thanks for the tip!) Anyway, first I imagine a checkbox somewhere that says "show two at a time." Then when you click some kind of forward arrow, it simply displays two images side by side (with some space between so they don't touch). Then when you click again it shows the next pair of images, etc. This could happen within the album just as slideshow does now. Instructors would then probably create special slideshow albums where they thought about the pairings so it works out right. Beyond that, there could be an option to show two images side by side but cycle through the pair one by one instead of two at a time, where in an a/b pair, b moves to the a slot and the next slide, c, moves to the b slot, then [mouseclick] c moves to the b slot and d replaces c, etc. The user story is a teacher in class projecting Gallery. Reaching over to her laptop or via clicker, she clicks through the lecture album she's prepared. Click, a pair of images. She mouses over to the hotspot, the metadata appears, she talks for a while, then clicks the arrow, another pair appears, she lectures some more. "In comparing Image A to Image B, we see that..." The next few images she wants to show singly, so she easily turns off the pair feature, then turns it back on again later. After class her students can go to that album online and see the same slideshow they saw in class, in pairs, or they can just click singly. This compare and contrast business is how Art History is taught at most universities. Ultimately it would be great to have the ability to "save" slideshows that are a mix of singles and pairs. so you don't have to remember to turn pairing on and off in the right sequence, and so students could really see it exactly the same as lecture, but that sounds harder. Just the first part above would go a long way. Thanks for considering this. Jeff Rusch |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Hi all-- |
|
Aylwin
![]()
Joined: 2003-09-16
Posts: 24 |
![]() |
Hi, What's the situation now with popup slideshow? Is it still on the "todo" list? I have it working quite well on Gallery 1 and I wouldn't want to lose it when I "formally" switch to Gallery 2. Thanks, |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
It works great in G2 as long as you're using IE. It's not a pop up window though. The slideshow is in the template. Which IMO is fine, most people block popups anyway. |
|
frederik.kunz
![]()
Joined: 2005-03-21
Posts: 37 |
![]() |
Only automatic popups are blocked, a window that opens if you click on a link will work on most setups. Anyway, I think that flash as standard and a fallback to classical slideshow would be perfect. I just love the look of the flickr-slideshows. I don't need the G1-transitions (IE proprietary), the iPhotoish-cross-fade would be fine. |
|
Trampek
Joined: 2005-06-05
Posts: 1 |
![]() |
frederik.kunz wrote:
Only automatic popups are blocked, a window that opens if you click on a link will work on most setups. Anyway, I think that flash as standard and a fallback to classical slideshow would be perfect. I just love the look of the flickr-slideshows. I don't need the G1-transitions (IE proprietary), the iPhotoish-cross-fade would be fine. And here comes Google and " Summer of Code" or "Summer of Gallery" :wink: sorry for my English (I'm Polish ) |
|
okohll
Joined: 2005-06-05
Posts: 2 |
![]() |
Slideshow default size: Hi, No one else has mentioned this so it might be a peculiarity in my setup but the default image size in my two gallery installations is 320x320 - a bit small, something like 800x600 would be better. For my installation I changed this by altering line 42 of modules/slideshow/templates/Slideshow.tpl to specify iSize=2 rather than iSize=0 but could this be made default? I'm using Gallery beta 2. Best regards Oliver Kohll |
|
KAC
Joined: 2004-12-01
Posts: 164 |
![]() |
okohll, Try using the search feature. Here is a link to the answer for you: |
|
okohll
Joined: 2005-06-05
Posts: 2 |
![]() |
Thanks for the link on how to change settings. My polite recommendation is to make the slideshow default to a larger size for the final release, based on some feedback I've had. Regards, Oliver |
|
Aylwin
![]()
Joined: 2003-09-16
Posts: 24 |
![]() |
So no in-built option for popup slideshow? Too bad. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
okohll, please file a feature request on http://sf.net/projects/gallery/ |
|
mihaal
Joined: 2007-01-05
Posts: 1 |
![]() |
Hi guys. I have one problem. "This album has no photos to show in a slideshow. Back to Album View" so I can't watch slideshow of that album. Can anybody help me with that? Thanx mihaal |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
that's how it is. there are feature requests to allow for recursive slideshows and the like, you're welcome to vote for those feature requests (http://gallery.menalto.com/sfvote/all). -------------- |
|