<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.17063" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=979164608-02082010><FONT face=Arial
color=#0000ff size=2>Hi Yves,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=979164608-02082010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=979164608-02082010><FONT face=Arial
color=#0000ff size=2>Both the overview and the detail view is rendered by the
same JSP; /system/modules/org.opencms.frontend.photoalbum/pages/album.html, but
m</FONT></SPAN><SPAN class=979164608-02082010><FONT face=Arial color=#0000ff
size=2>ost of the code has been placed in the Java
classes.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=979164608-02082010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=979164608-02082010><FONT face=Arial
color=#0000ff size=2>Best regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=979164608-02082010><FONT face=Arial
color=#0000ff size=2>Paul</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Yves
Glodt<BR><B>Sent:</B> 2. august 2010 10:36<BR><B>To:</B> The OpenCms mailing
list<BR><B>Subject:</B> Re: [opencms-dev] Photo album overview to crop
images<BR></FONT><BR></DIV>
<DIV></DIV>Hi Inge,<BR><BR>using<SPAN><FONT face=Arial color=#0000ff size=2>
CmsPhotoAlbumConfiguration(CmsJspActionElement jsp)</FONT></SPAN> the scaling
works.<BR><BR>A big step forward already. But it affects the detail-view, and
not the overview.<BR><BR>Where can I find the template or jsp-page which is
used to render the overview? I looked in
/system/modules/org.opencms.frontend.photoalbum/ but could not find
anything<BR><BR><BR><BR><BR>p.s.<BR><BR>My code in my
gallery-detail-template:<BR><BR>CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request, response);<BR>CmsPhotoAlbumBean
cmsPhoto = new CmsPhotoAlbumBean(pageContext, request,
response);<BR><BR>CmsPhotoAlbumConfiguration configuration = new
CmsPhotoAlbumConfiguration(cms);<BR>configuration.getDetailImageScaler().setQuality(90);<BR>configuration.getDetailImageScaler().setType(2);<BR>configuration.getDetailImageScaler().setCropArea(0,
0, 600, 600);<BR>cmsPhoto.setConfiguration(configuration);<BR><BR><BR><BR><BR>
<DIV class=gmail_quote>On 2 August 2010 10:14, Paul-Inge Flakstad <SPAN
dir=ltr><<A
href="mailto:flakstad@npolar.no">flakstad@npolar.no</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Hi again
Yves, </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>The
empty </FONT></SPAN><SPAN><FONT face=Arial color=#0000ff
size=2>CmsPhotoAlbumConfiguration constructor does no initialization. I
assume that's why it won't work.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Instead
you should probably use one of the other
constructors:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>CmsPhotoAlbumConfiguration(CmsJspActionElement
jsp)<BR>CmsPhotoAlbumConfiguration(CmsJspActionElement jsp, java.lang.String
configUri)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Best
regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Paul</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2>
<DIV class=im><B>From:</B> <A
href="mailto:opencms-dev-bounces@opencms.org"
target=_blank>opencms-dev-bounces@opencms.org</A> [mailto:<A
href="mailto:opencms-dev-bounces@opencms.org"
target=_blank>opencms-dev-bounces@opencms.org</A>] <B>On Behalf Of
</B>Yves Glodt<BR></DIV><B>Sent:</B> 29. juli 2010 13:47
<DIV>
<DIV></DIV>
<DIV class=h5><BR><B>To:</B> The OpenCms mailing list<BR><B>Subject:</B>
Re: [opencms-dev] Photo album overview to crop
images<BR></DIV></DIV></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV></DIV>Hi,<BR><BR>I did what you suggested, without a result...
<BR>when I set back the CmsPhotoAlbumConfiguration to the
CmsPhotoAlbumBean object, the album detailoverview is not displayed at all
anymore....<BR><BR>Any more hints for my square details pics ?<BR><BR>Best
regards,<BR>Yves<BR><BR>CmsPhotoAlbumBean cmsPhoto = new
CmsPhotoAlbumBean(pageContext, request, response);<BR><BR>// set the CSS
style class names<BR>CmsPhotoAlbumStyle style = new
CmsPhotoAlbumStyle();<BR>style.setClassThumbTable("pgThumbTable");<BR>style.setClassThumbImageTitle("pgThumbImageTitle");<BR>style.setClassThumbText("pgThumbText");<BR>style.setClassNavigation("pgNavigation");<BR>style.setClassDetailImageDescription("pgDetailImageDescription");<BR>style.setClassDetailImageTitle("pgDetailImageTitle");<BR><BR>cmsPhoto.setStyle(style);<BR><BR>CmsPhotoAlbumConfiguration
configuration = new
CmsPhotoAlbumConfiguration();<BR>configuration.getDetailImageScaler().setQuality(90);<BR>configuration.getDetailImageScaler().setType(2);<BR>configuration.getDetailImageScaler().setCropArea(0,
0, 80, 80);<BR><BR>cmsPhoto.setConfiguration(configuration); <SPAN
style="COLOR: rgb(255,0,0)"><- when I add this line, the album is not
displayed at all anymore</SPAN><BR><BR><BR><BR>
<DIV class=gmail_quote>On 9 July 2010 15:38, Paul-Inge Flakstad <SPAN
dir=ltr><<A href="mailto:flakstad@npolar.no"
target=_blank>flakstad@npolar.no</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Hi
Yves,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>That
method is protected, so you cannot access it
directly</FONT></SPAN><SPAN><FONT face=Arial color=#0000ff
size=2>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Try
something like this instead (haven't tested it
myself):</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>CmsPhotoAlbumConfiguration configuration = new
CmsPhotoAlbumConfiguration();</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>configuration.getDetailImageScaler().setQuality(90);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>configuration.getDetailImageScaler().setType(2);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>configuration.getDetailImageScaler().setCropArea(0, 0, 80,
80);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN>Hope this helps. :)</SPAN></DIV>
<DIV dir=ltr align=left><SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN>Best regards,</SPAN></DIV>
<DIV dir=ltr
align=left><SPAN>Paul</SPAN></DIV></SPAN></DIV></FONT></SPAN></DIV><FONT
face=Arial color=#0000ff size=2></FONT><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> <A
href="mailto:opencms-dev-bounces@opencms.org"
target=_blank>opencms-dev-bounces@opencms.org</A> [mailto:<A
href="mailto:opencms-dev-bounces@opencms.org"
target=_blank>opencms-dev-bounces@opencms.org</A>] <B>On Behalf Of
</B>Yves Glodt<BR><B>Sent:</B> 9. juli 2010 15:21<BR><B>To:</B> The
OpenCms mailing list<BR><B>Subject:</B> Re: [opencms-dev] Photo album
overview to crop images<BR></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV>
<DIV></DIV>I tried the following code down here in the template of my
photoalbum. Unfortulately it fails with:<BR><BR>"The method
setDetailImageScaler(CmsImageScaler) from the type
CmsPhotoAlbumConfiguration is not visible"<BR><BR>Anybody got a hint
for me... :-) ?<BR><BR>Best
regards,<BR>Yves<BR><BR><BR><I>CmsImageScaler scaler = new
CmsImageScaler();<BR>scaler.setQuality(90);<BR>scaler.setType(2);<BR>scaler.setCropArea(0,0,80,80);<BR><BR><BR>CmsPhotoAlbumConfiguration
configuration = new
CmsPhotoAlbumConfiguration();<BR>configuration.setDetailImageScaler(scaler);
<SPAN style="COLOR: rgb(255,0,0)">// it fails
here</SPAN><BR><BR>cms.setConfiguration(configuration);<BR>//cms.getConfiguration().getDetailImageScaler().setType(2);<BR>//cms.getConfiguration().getDetailImageScaler().setCropArea(0,0,80,80);<BR><BR></I>...<BR><BR>cms.displayAlbum();<BR><BR><BR><BR><BR>
<DIV class=gmail_quote>On 6 July 2010 09:57, Yves Glodt <SPAN
dir=ltr><<A href="mailto:yg@mind.lu"
target=_blank>yg@mind.lu</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Bumping...<BR><BR>In
fact, to clarify, I need to show the images in the gallery overview
in a square shape (100x100px), not rectangle.<BR><BR>Doing some
research I found that I can probably edit the template used for the
photo album and create a custom instance of
CmsImageScaler.<BR><BR>Is that possible? Are there any examples
around?<BR><BR>Best regards,<BR><FONT color=#888888>Yves</FONT>
<DIV>
<DIV></DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On 22 June 2010 10:28, Yves Glodt <SPAN
dir=ltr><<A href="mailto:yg@mind.lu"
target=_blank>yg@mind.lu</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hello,<BR><BR>is
it possible to have the photoalbum crop the images in the
overview?<BR>(I have a situation where the overview should have
square images only.)<BR><BR>Best regards,<BR><FONT
color=#888888>Yves<BR></FONT></BLOCKQUOTE></DIV><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></BLOCKQUOTE></DIV><BR><BR>_______________________________________________<BR>This
mail is sent to you from the opencms-dev mailing list<BR>To change your list
options, or to unsubscribe from the list, please visit<BR><A
href="http://lists.opencms.org/mailman/listinfo/opencms-dev"
target=_blank>http://lists.opencms.org/mailman/listinfo/opencms-dev</A><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>