Forum OpenACS Development: Random photo widget committed

Collapse
Posted by Jarkko Laine on
I finally came around to implement an includable, subsite-aware random photo widget for photo-album. It can be found from contrib/packages dir in openacs.org CVS.

Usage:

<include src="/packages/photo-album/www/random-photo" url="/photo-album-path/">

You can also use package_id instead of url if you please, or leave them both away. In the latter case the photo will be lotted from all photos in the system.

I also implemented size switch, with which you can specify whether a thumbnail (thumb) or a normal size image (viewer) is displayed. Thumb is the default.

Any feedback is welcome. Also if you'd like to port it to Oracle, please speak out.

Collapse
Posted by Tilmann Singer on
Sounds very useful - I guess that should be included in the standard photo-album. Those who don't need it won't be disturbed by it at least.
Collapse
Posted by Yves Goldberg on
Hello,

Is it possible to include random pictures but only from a folder or album within a subsite?

example:

<include src="/packages/photo-album/www/random-photo" url="/photos/?folder_id=1153">

or

<include src="/packages/photo-album/www/random-photo" url="/photos/album?album_id=1156">

this doesn work obviously but is the result I looking for.

TIA.

Yves.

this added to http://www.thecodemill.biz/publications/blog/one-entry?entry%5fid=9879 is great to include random pictures in relation with the ETP subject.

Collapse
Posted by Malte Sussdorff on
Random Photo has been changed to support album_id. You are able to say <include src="/packages/photo-album/www/random-photo" album_id=1156>.
Collapse
Posted by Yves Goldberg on
waoooo now that's cool :)

thanks MAlte

step-by-step we will have openacs working for endusers too!!

Collapse
Posted by Alfred Werner on
I was thinking of adding a slide show / album to ecommerce, since sometimes one photo is not enough.

Based on what you know of photo_album would it make sense to try to hook it to that API or reproduce the functionality of a subset?

The key difference I think would be it probably would be best to have the album or slideshow appear in a popup window (?)...

Thoughts welcome!

Collapse
Posted by Malte Sussdorff on
I would add this to the photo-album package, which allows you to call /packages/photo-album/www/slideshow via include that takes album_id as an argument and popup_p, random_order_p, refresh_rate.

If popup_p is true, a new window would open with the pictures of the album_id shown in random_order, refreshed every regresh_rate of seconds.

If popup_p is false, include a back and forth button at the bottom of the picture, that will (on_submit) go one page forward or backward, while keeping all the values of the surrounding page. Not even sure if this is possible, maybe you can do some java script magic with embeded elements, but it might stress the capabilities of HTML.

Alternatively, just display all the pictures below each other (if popup_p is false, that is ;)).