I've tweaked the XSLT to show a link to files for non image media instead of a broken image. I've also converted the original filename to lowercase as images uploaded as .JPG were not returning thumbnails:
Hi Dan - sorry for not having replied to this before...
Which version of Umbraco are you using? The thumbnail problem doesn't occur on 4.11.x for me, though it's good to have a fix in for it since the package works with just about any version since 4.5 (because of the new schema)...
I've toyed with a couple of other solutions for the "generic" files' thumbs but this works great too.
I'll probably put out a new release with these in mind, when I get the time.
Tweaks to XSLT for non-image media
I've tweaked the XSLT to show a link to files for non image media instead of a broken image. I've also converted the original filename to lowercase as images uploaded as .JPG were not returning thumbnails:
<xsl:variable name="thumbnail" select="concat(substring-before(Exslt.ExsltStrings:lowercase($file), concat('.', Exslt.ExsltStrings:lowercase(umbracoExtension))), '_thumb.jpg')"/> <xsl:if test="position() <= $mediaItemsToShow"> <xsl:choose> <xsl:when test="umbracoExtension='gif' or umbracoExtension='jpg' or umbracoExtension='png' or umbracoExtension='jpeg'"> <a href="/umbraco/editMedia.aspx?id={@id}" title="{@nodeName} (Click to edit)" style="float:left; width:100px; display:block; margin:0 5px 5px 0;"> <img style="-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.3);-mox-box-shadow:0 1px 2px rgba(0,0,0,0.3);box-shadow:0 1px 2px rgba(0,0,0,0.3);" src="{$thumbnail}" alt="{@nodeName}" width="100"/> </a> </xsl:when> <xsl:otherwise> <a href="/umbraco/editMedia.aspx?id={@id}" title="{@nodeName} (Click to edit)" style="float:left; width:100px; display:block; margin:0 5px 5px 0;"> <xsl:value-of select="@nodeName" /> (File type: <xsl:value-of select="umbracoExtension" />) </a> </xsl:otherwise> </xsl:choose> </xsl:if>Hi Dan - sorry for not having replied to this before...
Which version of Umbraco are you using? The thumbnail problem doesn't occur on 4.11.x for me, though it's good to have a fix in for it since the package works with just about any version since 4.5 (because of the new schema)...
I've toyed with a couple of other solutions for the "generic" files' thumbs but this works great too.
I'll probably put out a new release with these in mind, when I get the time.
/Chriztian
We upgraded to 6.x just before i installed this package.
Hi Dan,
I had a pull-request from Lee Kelleher fixing the casing issue - and I've implemented generic thumbnails (using the placehold.it service) for non-image media.
It's available in version 1.2 - you can go download the upgraded XSLT file directly from GitHub here (click the "Raw" button to download):
https://github.com/greystate/LatestEditsDashboard/blob/635d8aea500466425af0c4c11bf9615eb35f8436/dist/LatestEdits.xslt
Thanks for the heads up - please don't hesitate to report other issues if you find some.
/Chriztian
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.