forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: XSL for Photo Gallery
Date Tue, 23 Nov 2004 14:36:06 GMT
Jörg Werner wrote:
> okay, you got me hooked up. I found some more time to hack on the gallery 
> plugin. It is now in a working state. You can download the plugin from 

Excellent, thank you very much I will take a close look soon and publish 
it on the Forrest plugin lists (you get a "gold star" for being the 
first non-committer to develop a plugin :-))

> The pictures are expected unter {project:content.xdocs}/gallery/** in the 
> folders preview, small, big. Since the gallery plugin uses request 
> parameters, it will only work as a webapp.

Hmmm... have to look into this, I can't think of any reason, off the top 
of my head why this need be the case. All we need to do is move the 
parameters into the URL and it will work in static mode too (I'm not 
suggesting you need to do this, you provided the start, others can polish).

> On a related note (see FOR-387), I 
> don't think that it does make sense to generate the necessary image files on 
> the fly. This costs a lot of processor cycles. Think about the overview page. 
> Scaling 20 pictures from a 5MP-Digikam to preview size takes around 15s, and 
> this for each page request. Scales computationally really great (but caching 
> would help...).

In dynamic mode Cocoon does some very agressive caching, however, the 
first page request would indeed be slow. I think the trick would be to 
augment Cocoons caching by having a generator that writes the files to 
disk in the structure your plugin expects. In static mode we would be 
writing the files to disk so no problem there.

> Right now I use a short bash script to do the 
> conversion a la: 
> #!/bin/bash
> for i; do
>   echo -n "Converting:" $i "... ";
>   convert -size 100x100 $i -resize 100x100 preview/$i;
>   convert -size 400x400 $i -resize 100x100 small/$i;
>   convert -size 800x800 $i -resize 100x100 big/$i;
>   echo "done.";
> done
> It is sufficient for my purposes.

Yes, I'll put this in the docs.

> Todo for the plugin:

I'll put these in the plugin status.xml file too.

> But since I really don't have time for this, I leave these exercises to the 
> reader (I really hate this sentence in textbooks, but it is fun to use it in  
> his own texts ;-) )

HeHe, I spent a couple of years as a University lecturer and grew to 
love that phrase - it really means "I have too much other stuff to do 
right now".

Good look with your Thesis.


View raw message