Image Cropper - Hagge Options
warren
Posted: Wednesday, August 09, 2006 5:18:42 PM

Rank: Addict

Joined: 7/19/2006
Posts: 777
Location: Leigh-on-Sea, Essex, UK
I have tried using the image cropper. It all works apart from displaying the images.

This is my XSLT
<a href="http://cms2.momo.co.uk/xslt/listphotos.xslt ">http://cms2.momo.co.uk/xslt/listphotos.xslt </a>

The img src is always one id out.
eg:
http://cms2.momo.co.uk/media/thumbnails/1096_crop.jpg

when it should be,
http://cms2.momo.co.uk/media/thumbnails/1097_crop.jpg

Can anyone help me out?
Warren


Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
neehouse
Posted: Wednesday, August 09, 2006 5:52:39 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,074
Location: Charleston, West Virginia, United States
dirty fix, subtract one in your xslt.

Clean fix, get the source for the image cropper and fix the naming.



• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
neehouse
Posted: Wednesday, August 09, 2006 5:53:04 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,074
Location: Charleston, West Virginia, United States
-> rather, add one in your xslt

• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
warren
Posted: Monday, August 14, 2006 3:35:21 PM

Rank: Addict

Joined: 7/19/2006
Posts: 777
Location: Leigh-on-Sea, Essex, UK
This has been resolved too by Hagge himself.

<textarea>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">


<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:param name="currentPage"/>

<xsl:template match="/">

<!-- The fun starts here -->
<xsl:for-each select="$currentPage/node">
<div style="text-align: center; width: 150px; height: 125px; float: left; border: 1px solid #999; background-color: #EDEDED; padding: 5px; margin: 10px;">

<!-- get first photo thumbnail -->
<a href="{data [@alias='umbracoFile']}" class="thickbox">
<xsl:attribute name="title"><xsl:value-of select="./data [@alias = 'ImgAlt']"/></xsl:attribute>
<img>
<xsl:attribute name='src'>
<xsl:text>/media/thumbnails/</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text>_crop.jpg</xsl:text>
</xsl:attribute>
<xsl:attribute name='border'>
<xsl:text>0</xsl:text>
</xsl:attribute>
</img>
</a>
</div>
</xsl:for-each>

</xsl:template>
</xsl:stylesheet>
</textarea>

Warren Buckley an Umbraco MVP 08-09 & level 1 certified developer
Hagge
Posted: Monday, August 14, 2006 9:33:43 PM
Rank: Newbie

Joined: 7/27/2006
Posts: 10
Warren,
Great I missed your forum post. Thx for telling the solution. In a future release of the image cropper I will add support for correct naming.

// Martin

Martin Hagermark - You just have to Love Umbraco!
chris
Posted: Thursday, February 07, 2008 5:54:32 PM
Rank: Devotee

Joined: 4/12/2007
Posts: 93
Location: Amsterdam
Hi Warren,
In your xslt you reference to '_crop.jpg' but I get a blanc cross for it.....Is this because I use imagegen 1.3 instead of the latest 1.5 version??
I also check the files on the server but there are no thumbnails with _crop.jpg in it.........??
greetings,
Chris
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.