Hi Joel, for the analyzers, I have a script which renames images according to the mime-type they left in the log (we use squid in front of zope for log and caching) so /foo/bar/blahimg ... image/gif becomes /foo/bar/blahimg.gif - and the analyzer is happy. Of course, the analyzer could have done this by its own, but lets blame its developer for this. For work with DAV/FTP I have a image folder class which renames incoming files to without suffix and vice versa for download. Its a more or less subclass of Folder as python product. Regards Tino --On Sonntag, 22. Juli 2001 18:11 -0400 Joel Burton <jburton@scw.org> wrote:
Our site currently has images that have no .gif or .jpg at the end of their ids. We're starting to use a clickthrough-analysis program that tracks site usage, and assumes that all '.gif' and '.jpg' file are graphics. Of course, to track site usage, it's important for the analysis program to distinguish graphic requests from page requests.
We planned to rename all of our image file to __.gif, but because of the overloaded meaning of the "." (as both separting objects & methods/attributes, and as a file extensionn), it makes for very ugly DTML -- something like:
<dtml-var "images.randompic.tag(hspace=10)">
has to become
<dtml-with images> <dtml-with randompic.gif> <dtml-var "tag(hspace=10)"> </dtml-with> </dtml-with>
Or
<dtml-var "images['randompic.gif'].tag(hspace=10)">
which is better, but still as nice as the original.
Of course, we could make our own img tags, like:
<img src="/images/randompic.gif" hspace=10>
but then we lose the automagic titles, height, width, etc. that Zope can provide.
On the plus side, having graphic files with "ordinary" extensions will let us work a bit easier w/WebDAV and FTP, as some programs always expect file to have these extensions.
So:
1) Is there any way to call a picture within a folder without the twice-nested call above? Any workarounds?
2) Any other ideas on how to handle this? How do other sites deal with this?
Any advice/help would be appreciated.
-- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )