Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Grillo Frederiksen 34 posts 67 karma points
    Jan 24, 2012 @ 22:08
    Peter Grillo Frederiksen
    1

    Vimeo file not found - problem

    Hey All,

    I'm creating an image gallery, where I also uses Vimeo-videos.
    It's no problem to create thumbnails for the pictures.

    For creating thumbnails for Vimeo, I use this code:

    <xsl:variable name="Vimeopath" select="concat('http://vimeo.com/api/v2/video/1234.xml')" />
    <xsl:variable name="VimeoInfo" select="document($Vimeopath)" />

    <img src="{$VimeoInfo/videos/video/thumbnail_medium}" height="95px" border="0" />

    Easy-Piecy.

    The problem arises, when the Vimeo-file is either password-protected or does not exist.
    How do I check to see, if the Vimeo-file exists?

    If you se the above link to Vimeo, you get an error: "666 not found."
    And if you use the above code, the XSLT will not run.

    Can anybody help me?
    Cheers

    Peter

  • Peter Grillo Frederiksen 34 posts 67 karma points
    Jan 24, 2012 @ 22:09
    Peter Grillo Frederiksen
    0

    BTW...

    "666 not found." off course is only when you use "666" instead of "1234" in the xml-link.

  • Rodion Novoselov 694 posts 859 karma points
    Jan 24, 2012 @ 23:25
    Rodion Novoselov
    1

    Hi. Maybe this would help:

    <xsl:variable name="Vimeopath" select="'http://vimeo.com/api/v2/video/1234.xml'" />
    <xsl:variable name="VimeoInfo" select="umbraco.library:GetXmlDocumentByUrl($Vimeopath)" />
    <xsl:if test="not($VimeoInfo/error)">
        <img src="{$VimeoInfo/videos/video/thumbnail_medium}" height="95px" border="0" />
    </xsl:if>
  • Peter Grillo Frederiksen 34 posts 67 karma points
    Jan 25, 2012 @ 09:15
    Peter Grillo Frederiksen
    0

    Rodion, your the man!!
    Thx a LOT! 

  • 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.

Please Sign in or register to post replies