[Zope] What is the best place for an /Images directory ?
Jeff Hotz
jeff@hotz.net
Sat, 07 Jul 2001 11:38:45 -0500
Would someone please take a minute to explain their recommendation and
reasoning behind where best to locate (/usr/local/images,
/usr/local/zope/images, /usr/local/zope/var/images) static images? I'm
using LocalFile and CoreSession products also.
I'm new administering Linux (RedHat 7.1) so any help/theory you can offer
will be greatly appreciated.
I've created a photo album and display the images using the following code
PS - comments on my code are also welcome
<dtml-let tmpSesData="ZSessionDataMgr.getSessionData()"
yearVar="tmpSesData.get('sSesYear')"
sHexMonth="_.string.upper(_.hex(tmpSesData.get('iSesMonth')+1)[2])">
<dtml-in "ZLFSImagePath[yearVar].fileIds()">
<!-- get working vars -->
<dtml-let iSeqIndex=sequence-index sFileName=sequence-item>
<!-- image processing logic -->
<!-- filter to the selected month / filenames have the month in HEX as
the 2nd character of the file name-->
<dtml-if "sFileName[1] == sHexMonth">
<!-- row processing logic -->
<dtml-if "_.divmod(iSeqIndex,thumb_columns)[1] == 0">
<TR>
</dtml-if>
<TD align="center">
<a href="ZLFSImagePath<dtml-var dir_sep_char><dtml-var
yearVar><dtml-var dir_sep_char><dtml-var sFileName>" target="_blank">
<img src="ZLFSImagePath<dtml-var dir_sep_char><dtml-var
yearVar><dtml-var thumb_path><dtml-var dir_sep_char><dtml-var
thumb_precursor><dtml-var sFileName>.<dtml-var thumb_extension>"
alt="<dtml-var sFileName>">
</a>
</TD>
<!-- row processing logic -->
<dtml-if "_.divmod(iSeqIndex+1,thumb_columns)[1] == 0">
</TR>
</dtml-if>
</dtml-if>
</dtml-let>
</dtml-in>
</dtml-let>
jeff@hotz.net
www.hotz.net