Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

some ideas/feature requests for multiuser sites



Hi,

I've been using A::G for some months now and am mostly satisfied with it.
There are some areas, however, where I feel the program could be improved.

One of the sites I run it on has several dozen users, and there are a number
of issues A::G doesn't handle in the optimal way:

- the .cache directory. It needs to be writable by the user apache runs as
(typically www-data). However, if a non-root user wants to create a gallery,
they have no way of creating a .cache directory that's writable by www-data
(but not world writable). (I know, on some systems you can give files away,
but not on all of them.)

So, each time a user creates a new gallery, I have to go and set up a .cache
directory for them.

There are several ways to approach this problem. You could store all caches
in subdirectories of a central directory, where the subdirectory names are
md5 hashes of the path of the gallery, for example. This isn't, I guess,
very difficult to do. This would have the disadvantage that it would be
slightly more difficult to keep track of the amount of disk space each
user's caches require, but I can live with that. The advantages are obvious:
the administrator only needs to create one central cache directory, alias it
in the virtualhost configuration to something like /apache-gallery-cache/,
and that's it. Everything else is taken care of automagically. It is even
trivial to run tmpreaper on the central cache directory every once in a
while. (I actually hacked something like this together, but I'm not very
good at perl, so it got pretty messy.)

The other way to go about it would be to make A::G run as the user who owns
the gallery. This would have the advantage that the users's disk quotas
would prevent the gallery caches from using up an arbitrary amount of space.
To me it looks like it's more difficult to implement securely, though.

- Another nice feature to have would be per-user gallery customization. It's
possible to override the TemplateDir setting in a .htaccess file, but can
you override gallery.css? How?

- What bothers me most is that 'original' apparently cannot be used as a
picture size specification. I think it should be possible to browse the
gallery in such a way that all pictures are displayed in their original
size, and the links, info-box etc. still appear. The user can still download
the original image by e.g. right-clicking on it.

- It would be nice to have GalleryHeights and GalleryWidths instead of only
GallerySizes. The pictures could be scaled to a size where their height is
at most Y and/or their width is at most X, to make them fit a certain screen
resolution. For example, you could specify GalleryWidths '640 800 1024 1280'
and GalleryHeights '480 600 768 1024'; the user could then select a height
as well as a width, if they want to (naturally, the pictures still retain
their aspect ratio). This potentially leads to an increase in the number of
cache images generated and would also make A::G more complex; it's just an
idea, and I'm not certain the above is the best way to do it.

- Can galleries have titles (other than the directory name)? How?

Andrew

-- 
            Andrew Korn (Korn Andras) <korn@xxxxxxxxxxxxxxxxxxxxxx>
             Finger korn@xxxxxxxxxxxxxxxxxxxxxx for pgp key. QOTD:
                     What happens if you .ARC de Triomphe?