Slideshow module development

mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2004-01-09 21:51

Hi all--
This topic is for discussion and feedback regarding development of the Slideshow module for G2, which I am working on. Following XP methodology I am starting by implementing a user story of the most basic functionality.. here is the user story from Bharat:

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
fedak's picture

Joined: 2003-12-14
Posts: 80
Posted: Mon, 2004-01-12 17:51

> 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
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2004-01-13 04:29

Great, thanks Fedak.
Here's my own feedback on the work so far: the first thing I noticed was now that slideshow is an available command ("item link") on every item there is a listbox below everything, even with the guest login. This clutters up the view in my opinion..

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
Posted: Thu, 2004-01-15 02:07

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
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2004-01-16 16:08

Thanks for the input, Jeff.
Most of the items are things I'd like to see as well.. I've prototyped some ideas in G1 that cover #1 and #4.. check out <link-gone> and click slideshow if you're interested. Click anywhere to pause/play, move mouse near the bottom to see captions/controls.
Two slides at once is something I hadn't considered.. how would that work? Would each photo come from the same or different albums?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2004-01-20 22:25

Hi all-
I checked in most of the 2nd user story last friday.. it can show the title, summary and description of the photos; there is a link to show/hide that info. Feedback welcome.

Bharat-
Your user story also mentioned display of "capture date". I have a couple questions about that: First, how do you envision cross-module interaction taking place? I was thinking something like this:

    $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..
My second question is specific to the exif module.. if $useExif is true then I'll call ExifHelper::getExifData (if item is image/jpeg).. the results coming back seem to have localized titles and the values, but no keys.. do you think the result should retain the keys (like "DateTime") so I can look for a specific item? Where the exif module uses the result it just shows all the data.. I'd like to do: {if isset($item.exifData.DateTime)}...{/if}

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2004-01-21 01:21

Cross module interaction should be governed by interfaces, with
interactions exposed by the GalleryFactory. This allows us to
have many different EXIF implementations without requiring a
specially named module, etc. You can find an example of this
in the search module (except it works the other way with search
-- the search module defines an interface and the other modules
extend it and register their own implementations.

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
argument with the name of the implentation class. Search requests all
implementation ids and then asks each one in turn, but that makes
sense for search because it wants to actually search all modules.
You'll probably want to modify the newInstance() call so that if the
class name is null it just takes the first implementation that it
finds.

The obvious advantage of this technique is that it detaches EXIF
functionality from its implementation. Since the implementaiton is
inside the EXIF module, it can deal directly with the keys (eg,
'CaptureDate') so that you don't have to change the other API methods
to return both the i18n value and the key value (as yo umentioned in
your post).

I also was thinking along the lines of using a similar interface when
implementing the "show all search results as a slideshow" user story.
I haven't thought this through fully, but I'm thinking that in this
case, we'd create a search interface with a method that allows you to
provide a series of ids and it would return a url to a view that would
provide a slideshow across all those ids.

Thoughts?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-01-21 06:04

Ok, I will add ExifInterface so slideshow can request Capture Date data.
I agree this sounds like a good mechanism for Search to request a slideshow of a given set of items.. but this one differs in that the end result is a view, not just some data... will figure that out later.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-01-21 18:40

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
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2004-01-23 00:05

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
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2004-01-25 21:33

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:
1) if every item in the slideshow has only one size available then don't show any control to the user for picking size.. just show what we've got.
2) if every item has at most 2 sizes then show a listbox with "large" and "small" ?
3) if at least one item has >2 sizes then... ?
The user story above implies a list of standard choices like "800x600", "1280x1024", etc. With a list like that I wonder what logic to employ to pick the right derivate for display... perhaps largest derivate where both width and height stay under the requested size...
Other ideas on how this piece should work are welcome..

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2004-01-25 23:56
mindless wrote:
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:
1) if every item in the slideshow has only one size available then don't show any control to the user for picking size.. just show what we've got.
2) if every item has at most 2 sizes then show a listbox with "large" and "small" ?
3) if at least one item has >2 sizes then... ?
The user story above implies a list of standard choices like "800x600", "1280x1024", etc. With a list like that I wonder what logic to employ to pick the right derivate for display... perhaps largest derivate where both width and height stay under the requested size...
Other ideas on how this piece should work are welcome..

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:

  • < 320x240
  • 320x240 - 640x480
  • 640x480 - 800x600
  • 800x600 - 1280x1024
  • > 1280x1024

Or perhaps it's just confusing to the end user to list the numbers and we should just have:

  • Smallest (thumbnails)
  • Small
  • Medium
  • Large
  • Largest

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
Posted: Mon, 2004-01-26 01:20
mindless wrote:
Thanks for the input, Jeff.
Most of the items are things I'd like to see as well.. I've prototyped some ideas in G1 that cover #1 and #4.. check out http://flowers.aruna.org/ and click slideshow if you're interested. Click anywhere to pause/play, move mouse near the bottom to see captions/controls.
Two slides at once is something I hadn't considered.. how would that work? Would each photo come from the same or different albums?

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
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-01-26 01:55
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.

Does your full screen slideshow work with v1.4.x? The broadband users of my Gallery would love it!

Yes, the link I gave is to my 1.4.1 install. You can find the full details of this patch at:
http://sourceforge.net/tracker/index.php?func=detail&aid=869666&group_id=7130&atid=307130

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-01-26 20:50

Bharat-
I'm experimenting a bit with examining the derivative sizes.. sometimes I don't find a "width" and "height".. how can I ensure those attributes are available? I've noticed similar behavior in the album view: if I view a single item it will show me a derivative size; the size picklist sometimes has "Unknown" as the last entry. If I pick that item and then refresh the page the picklist will now have the correct full size..

 
Aylwin
Aylwin's picture

Joined: 2003-09-16
Posts: 24
Posted: Tue, 2004-01-27 16:56

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]
Figured it out already. My hands are quicker than my brain. :oops:

By the way, I absolutely love the popup slideshow! Well done!
[/edit]

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2004-01-29 00:18

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
Aylwin's picture

Joined: 2003-09-16
Posts: 24
Posted: Thu, 2004-01-29 01:09

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
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2004-02-01 19:17

Recent updates:
- direction chooser (forward/reverse/random)
- delay chooser (3/5/10/15/20 seconds)
- control to show/hide toolbar
Feedback on these or any work-date-date is welcome.

Probably the next thing I'll look at is recursive slideshow (include subalbums).

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2004-02-01 21:47

we want 1 or 0 seconds delay!
idea is getting flashed by the pics ;)
always loved the 0 seconds delay acdsee slideshow and the 1 second from Gallery 1.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2004-02-03 05:48

valiant, so far nothing is configurable, but I'll get there.
I'll also try to make sure a delay of zero seconds won't break anything :-?

 
jrusch

Joined: 2003-06-10
Posts: 8
Posted: Thu, 2004-02-12 03:26
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
UC Berkeley

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2004-03-23 02:12

Hi all--
Been awhile (sidetracked by hybrid layout and imageblock module), but I've still got slideshow on my radar.. I recently committed code to generate recursive slideshows (but not yet integrated into the UI) and have done some development on viewing search results in a slideshow (commit coming soon, probably tomorrow)..

 
Aylwin
Aylwin's picture

Joined: 2003-09-16
Posts: 24
Posted: Wed, 2005-06-01 09:39

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,
Aylwin

 
KAC

Joined: 2004-12-01
Posts: 164
Posted: Wed, 2005-06-01 12:48

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
frederik.kunz's picture

Joined: 2005-03-21
Posts: 37
Posted: Wed, 2005-06-01 19:16

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.
It's of course easy to "demand" such a thing - I'm not a programmer and have no flash experience whatsorever, so I can't do it myself.

 
Trampek

Joined: 2005-06-05
Posts: 1
Posted: Sun, 2005-06-05 18:42
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.
It's of course easy to "demand" such a thing - I'm not a programmer and have no flash experience whatsorever, so I can't do it myself.

And here comes Google and " Summer of Code" or "Summer of Gallery" :wink:
First of all - Hello :) i'm new to this forums and to Gallery - I didn't use the 1st version cause i design sites in flash and make my own galleries.
I'm interested in designing a Flash Slideshow module or even the whole layout.Now i'm reading developement stuff and learning what is what :)
many things to do but let's hope the flash slideshow module will be ready soon
nice project you got here ;) G2 looks and works great...

sorry for my English (I'm Polish )
BTW i can translate Gallery2 to Polish if you're interested :) after writing the flash slideshow of course ...

 
okohll

Joined: 2005-06-05
Posts: 2
Posted: Sun, 2005-06-05 23:49

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
Posted: Mon, 2005-06-06 12:27

okohll,

Try using the search feature.

Here is a link to the answer for you:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=29143&highlight=

 
okohll

Joined: 2005-06-05
Posts: 2
Posted: Mon, 2005-06-06 12:44

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
Aylwin's picture

Joined: 2003-09-16
Posts: 24
Posted: Wed, 2005-06-29 09:59

So no in-built option for popup slideshow? Too bad. :(

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-06-29 14:04

okohll, please file a feature request on http://sf.net/projects/gallery/
the feature request (RFE) should have [G2] and Slideshow in its title.
thanks.
also please add a link to this forum thread in the RFE.

 
mihaal

Joined: 2007-01-05
Posts: 1
Posted: Wed, 2007-01-17 20:48

Hi guys.

I have one problem.
When I want to run slideshow in an album where are only pics everything is okay.
But when I run slideshow in an album that consist of other albums I always get this message:

"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
Posted: Thu, 2007-01-18 01:35

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).

--------------
Enter the Gallery 2 Theme Contest today!