Copied to clipboard

Flag this post as spam?

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


  • Raheel 62 posts 81 karma points
    Oct 12, 2010 @ 03:25
    Raheel
    0

    Need a simple Photo Gallery

    Hi guys...

     

    I have been looking under projects and forum for a photo galley.

    What I need is:

    - I have all my photos in media in a folder called "Gallery1"
    - Want to be able to display all of these photos as a 100x100 thumbnail and when clicked on it it will show the a larger size of 300x300 in a LightBox.

    I have tried to use: EyeCatch UmBox Image
    http://our.umbraco.org/projects/website-utilities/eyecatch-umbox-image-gallery

    There isnt much documentation online so I am stuck on that.

    --

    I also tried to use:

    Designit Gallery
    http://our.umbraco.org/projects/website-utilities/designit-gallery-package

    For some reason I don't know where I am going wrong.
    I have even followed the process written on:

    http://our.umbraco.org/forum/getting-started/questions-about-runway-and-modules/10654-How-to-set-up-Designit-Gallery-Package-and-make-it-work

     

    --

    Now I wonder, if there is something who can guide me into getting a Simple Gallery Online. Is there any thing available?

     

    Thanks
    Raheel

     

  • Bas Schouten 135 posts 233 karma points
    Oct 13, 2010 @ 11:18
    Bas Schouten
    0

    Hi Raheel,

    I use a similar way of to display images. U can try and modify this xslt. It builds a 3 column table with images from the media library.

    <?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" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
     exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
     
     <xsl:output method="xml" omit-xml-declaration="yes"/>
     
     <xsl:param name="currentPage"/>
     
     <xsl:variable name="source" select="umbraco.library:RequestQueryString('id')"/>
     
     <xsl:variable name="ImageFolder" select="umbraco.library:GetXmlNodeById($source)/data[@alias='afbeeldingen']" />
     
     <xsl:template match="/">
      <!-- start writing XSLT -->
      <xsl:if test="$ImageFolder != ''">
       <table id="projecten-images" cellpadding="4" cellspacing="0" border="0" width="540">
        <xsl:apply-templates select="umbraco.library:GetMedia($ImageFolder, 'yes')/node[position() mod 3 = 1]" mode="table-row" />
       </table>
      </xsl:if>
     </xsl:template>
     
     <xsl:template match="node" mode="table-row">
      <tr class="test">
       <xsl:apply-templates select=". | following-sibling::node[position() &lt; 3]" mode="table-cell" />
      </tr>
     </xsl:template>
     
     <xsl:template match="node" mode="table-cell">
      <xsl:variable name="fillNodes" select="3 - last()" />
      <td align="center" valign="middle">
       <xsl:choose>
        <xsl:when test="(data [@alias = 'umbracoWidth']) &gt; (data [@alias = 'umbracoHeight'])">
         <a rel="group" href="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=600&amp;compression=100" title=""><img src="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=150&amp;compression=100" alt="{@nodeName}"></img></a>
        </xsl:when>
        <xsl:otherwise>
         <a rel="group" href="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;height=600&amp;compression=100" title=""><img src="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;height=150&amp;compression=100" alt="{@nodeName}"></img></a>
        </xsl:otherwise>
       </xsl:choose>
      </td>
      <xsl:if test="$fillNodes &gt; 0 and position() = last()">
       <xsl:call-template name="for.loop">
        <xsl:with-param name="i">0</xsl:with-param>
        <xsl:with-param name="count" select="$fillNodes" />
       </xsl:call-template>
      </xsl:if>
     </xsl:template>
     
     <xsl:template name="for.loop">
       <xsl:param name="i"      />
       <xsl:param name="count"  />
       <!--begin_: Line_by_Line_Output -->
       <xsl:if test="$i &lt; $count">
        <td>&nbsp;</td>
       </xsl:if>
       
       <!--begin_: RepeatTheLoopUntilFinished-->
       <xsl:if test="$i &lt;= $count">
         <xsl:call-template name="for.loop">
           <xsl:with-param name="i">
             <xsl:value-of select="$i + 1"/>
           </xsl:with-param>
           <xsl:with-param name="count">
             <xsl:value-of select="$count"/>
           </xsl:with-param>
         </xsl:call-template>
       </xsl:if>
     </xsl:template>
     
    </xsl:stylesheet>

     

  • Raheel 62 posts 81 karma points
    Oct 14, 2010 @ 00:17
    Raheel
    0

    Hi Bas,

    Thanks for that, I maybe should have posted this into a different section. : (
    I have some understanding on XLS but not a pro to be able to understand each things.

    I just want a simple solutions which I cannot find any where:

    On one of our product pages I want to display all the product images.

    Designit Gallery is the best suited to me.
    our.umbraco.org/.../designit-gallery-package

    But I cannot get it to work, the image does not display for some reason.

    Anyone here that can help me simply get images from a SPECIFIC folder in media to be displayed on a page and when clicked on gets a light box.

    Thanks
    Raheel

  • Bas Schouten 135 posts 233 karma points
    Oct 14, 2010 @ 08:34
    Bas Schouten
    0

    Hi Raheel,

    I cleaned up the script for. If you fill the variable "Folder" with the id of the media folder it generates a clean list of all images.

      <xsl:variable name="Folder" select="1131" />
      
      <xsl:if test="$Folder != ''">
       <ul>
        <xsl:for-each select="umbraco.library:GetMedia($Folder, 'yes')/node">
         <li>
          <xsl:choose>
           <xsl:when test="(data [@alias = 'umbracoWidth']) &gt; (data [@alias = 'umbracoHeight'])">
            <a rel="group" href="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=600&amp;compression=100" title="">
             <img src="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=300&amp;height=300&amp;compression=100" alt="{@nodeName}"></img>
            </a>
           </xsl:when>
           <xsl:otherwise>
            <a rel="group" href="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;height=600&amp;compression=100" title="">
             <img src="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=300&amp;height=300compression=100" alt="{@nodeName}"></img>
            </a>
           </xsl:otherwise>
          </xsl:choose>
         </li>
        </xsl:for-each>
       </ul>
      </xsl:if> 

    Cheers,

    Bas

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 14, 2010 @ 08:40
    Dirk De Grave
    0

    Raheel,

    Always remember to add your umbraco version in your post, as the solution may be completely different for a pre 4.5 version compared to a v4.5+ version of umbraco.

    Anyway, Bas' solution is perfect for when you'd be using a pre 4.5 umbraco or a 4.5+ version with UseXmlLegacySchema=true.

     

    Cheers,

    /Dirk

  • Raheel 62 posts 81 karma points
    Oct 15, 2010 @ 02:20
    Raheel
    0

    @ Dirk, thanks for that. Ill remember it next time : )

     

    @Bas - I have tried the script - On the front end I end up getting broken images.

    The folder ID is 1264 and is named Drainage under Media


      
    <xsl:variable name="Folder" select="1264" />
      
      <xsl:if test="$Folder != ''">
       <ul>
        <xsl:for-each select="umbraco.library:GetMedia($Folder, 'yes')/node">
         <li>
          <xsl:choose>
           <xsl:when test="(data [@alias = 'umbracoWidth']) &gt; (data [@alias = 'umbracoHeight'])"
            <rel="group" href="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=600&amp;compression=100" title=""
             <img src="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=300&amp;height=300&amp;compression=100" alt="{@nodeName}"></img
            </a
           </xsl:when>
           <xsl:otherwise
            <rel="group" href="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;height=600&amp;compression=100" title="">
             <img src="/umbraco/ImageGen.ashx?image={./data[@alias = 'umbracoFile']}&amp;width=300&amp;height=300compression=100" alt="{@nodeName}"></img
            </a
           </xsl:otherwise>
          </xsl:choose>
         </li>
        </xsl:for-each>
       </ul>
      </xsl:if
      

     

    What can I do?

    Thanks
    Raheel

  • Bas Schouten 135 posts 233 karma points
    Oct 15, 2010 @ 08:27
    Bas Schouten
    0

    Hi Raheel,

    Do you use the imagegen package?

    http://our.umbraco.org/projects/website-utilities/imagegen

    Cheers,

    Bas

     

  • Rich Green 2246 posts 4008 karma points
    Oct 15, 2010 @ 08:34
    Rich Green
    0

    Hi Raheel,

    It could help if you could post the HTML source you are getting that has your broken images.

    Rich

Please Sign in or register to post replies

Write your reply to:

Draft