Forum OpenACS Development: Re: Photo-Album Includelet for Xowiki

Collapse
Posted by Michael Aram on
Richard,

I was also thinking about implementing something like an xowiki-based photo album application, but did not have the time yet (and probably will not in the near future).

However I want to share some thoughts, i.e. what my approach would maybe look like:

1) Using XoWiki-Folders (i.e. FormPages based on the folder.form) as albums. (alternatively, define a new form album.form similar to the folder.form)
2) Using the page_order field to define the order among the photos in the album.
3) Optionally defining an {{albums}} includelet, which can be used on the wiki startpage to display the subfolders (i.e. albums) in a special way (teaser image,...)
3) Defining a special index page for the "album folders", which holds another new includelet "grid-view", which displays the folder's photos as "thumbnails" in a typical "gallery style".
4) Using yui-carousel for the "sideshow" mode of the album.

In fact, I think it would be great to focus on the possibility to create albums, slideshows, etc. for ANY type of xowiki page (not only images). For example, if you allow not only images, but also pages to be used by the "slideshow" includelet, this would be super flexible (e.g. the user could add "separator pages" for each island in a sailing trip album).

Please note, that many of the features mentioned above are still under development, which means one would have to digg into the xowiki code, maybe enable experimental features like the Menubar, etc...

Collapse
Posted by Gustaf Neumann on
Before you are wondering, what Michael Aram is talking about: xowiki has several new functionalities, many of those are not committed to the public cvs. One of those are the folder-procs, which provide means for organizing xowiki content in folders. The main reason, why the folder-procs are not in the public cvs is that these contains code, which i am not content with, therefore i was quiet about it. But maybe, i will remove/deactivate these parts and commit to cvs, to make the communication easier. With the folder-procs, one can activate the menu-bar and the folder display.

To see this in action, look at http://alice.wu-wien.ac.at:8000/xowiki/images/carousel-test

The code has as well bulk-upload, etc. I am these weeks very busy (xotcl 2.0, most busy time at the university, new study programs, external evaluations, fighting for budgets, track chair on a large conference, etc.), but maybe i can spend some time in the evening on that.

-gustaf neumann

PS: Richard, you should check from time to time your mailbox.

Collapse
Posted by Richard Hamilton on
Gustaf,

Thank you for the reply. I am very sorry that I missed the posts in between my own. That was because I was posting them from my cellphone in a moving car which took me a while! 😊

I am stunned by the new capabilities. That looks absolutely amazing. If at any stage I can be of assistance please let me know.

Regards and many thanks
Richard

Collapse
Posted by Gustaf Neumann on
i have committed the two experimental file menu-procs and folder-procs to cvs. To activate it, set the package parameter MenuBar to 1.
Collapse
Posted by Richard Hamilton on
Oh fantastic, thank you. I shall do that immediately!

Regards
Richard

Collapse
Posted by Richard Hamilton on
Well that sounds like a list of excellent ideas! I'd love to work towards those goals, and whilst it will take me a little while to become familiar with coding using xotcl, I am more than willing to devote the time to learning how to.

I am not sure what the next step would be, so shall I wait to hear from you or is there something I can be working on?

Regards
Richard

Collapse
Posted by Richard Hamilton on
Photo Album objects seem to be associated with three content_types. However, curiously the package names associated with these are not all 'photo_album' as might have been expected:

The basic photo-album package registers the following:

object_type              package_name
~~~~~~~~            ~~~~~~~~~
pa_album                  pa_album
pa_photo                  pa_photo

A comment in the code mentions that the former content_type pa_image has been deprecated in favour of using the general content repository content_type 'image'. The 'image' type is therefore not in fact registered by the photo-album package and its package name is also 'image':

object_type              package_name
~~~~~~~~            ~~~~~~~~~~~~
image                        image

A later addition intended to act as a simple clipboard for creating presentations adds this:

object_type              package_name
~~~~~~~~            ~~~~~~~~~~~~
photo_collection        photo_album

I am not entirely sure what the intended standard is with respect to setting the package_name attribute, but certainly where a package owns a content type I would have expected the package_name attribute to reflect that relationship.

Nevertheless, pa_album and pa_photo as content_types are used in a way analogous to the new ::xowiki::Folder for grouping content items together. A pa_album contains pa_photos, and a pa_photo always contains three cr_items which point to revisions of the originally uploaded image, the autogenerated 'view' image, and the autogenerated thumbnail image.

-4
|
-100 content_folder - Name, pages
|
|
979 content_folder - Name, photo-album_966
|
1040 pa_album - Name, myAlbum
|
1268 pa_photo - Name, file01.jpg
|
|___1270 view
|
|___1271 base
|
|___1272 thumbnail

When I start working on an includelet to provide an alternative to photo-album within xowiki, do you think it will be reasonable to create an ::xowiki::Folder for each image uploaded, and have the content repository autogenerate the thumnail and the view image for each uploaded image according to parameters passed in the includelet declaration?

i.e.

{{xophoto_album -autogenerate {view width "" thumb width ""} }}

(NB. This assumes aspect ratio to be preserved)

There seems to be a good case for generating thumbnails and intermediate 'view' sized images on the server in order to reduce the bandwidth requirements for the intended YUI based photo-display carousel. Otherwise, the server would have to send all the full sized images across to the browser and the browser would have to do the re-sizing.

My plan is to present an initial set of thumbnails in a carousel with a single view image on display (similar to existing photo-album but using asynchronous requests instead of refreshing the whole page). User action would then trigger additional thumbnails and view images to be retrieved from the server as required, as per this YUI2 demo:

http://developer.yahoo.com/yui/examples/carousel/csl_dynload2.html

The base image display would be a separate display mode which becomes a simple slideshow of full sized images (as per the existing {{yui-carousel}} includelet), with each being loaded asynchronously 'under the fold' and being displayed when ready.

At this stage I would be grateful for comments and suggestions.

Regards
Richard