<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -17,7 +17,8 @@ module GalleryLightboxTags
   
   desc %{
     Usage:
-    &lt;pre&gt;&lt;code&gt;&lt;r:gallery:lightbox [thumb_width='width' thumb_height='height'] [thumb_size='size' thumb_geometry='c84x84'] [image_width='width' image_height='height'] [image_size='size'] [thumbnail='none']/&gt;&lt;/code&gt;&lt;/pre&gt;
+    &lt;pre&gt;&lt;code&gt;&lt;r:gallery:lightbox [thumb_width='width' thumb_height='height'] [thumb_size='size' thumb_geometry='c84x84'] 
+    [image_width='width' image_height='height'] [image_size='size'] [thumbnail='none'] [class='klass' limit='5']/&gt;&lt;/code&gt;&lt;/pre&gt;
     Provides a sized image for current gallery item.
     Current size values are: icon, small, medium, large, original }
   tag 'gallery:lightbox' do |tag|    
@@ -25,13 +26,15 @@ module GalleryLightboxTags
     tag.attr[&quot;image_size&quot;] = :large unless (tag.attr[&quot;image_width&quot;] || tag.attr[&quot;image_height&quot;] || tag.attr[&quot;image_size&quot;])
     gallery = find_gallery(tag)
     
-    content = %{ &lt;div class=&quot;lightbox_gallery_list&quot;&gt;&lt;ul&gt; }
-    gallery.items.each do |item| 
+    klass = &quot; class='#{tag.attr['class']}'&quot; if tag.attr['class']
+    content = %{ &lt;div class=&quot;lightbox_gallery_list&quot;&gt;&lt;ul&gt; }      
+    limit = tag.attr['limit'].to_i &gt; 0 ? tag.attr['limit'].to_i - 1 : gallery.items.length - 1
+    gallery.items[0..limit].each do |item| 
       width, height, size, geometry = tag.attr[&quot;thumb_width&quot;], tag.attr[&quot;thumb_height&quot;], tag.attr[&quot;thumb_size&quot;], tag.attr[&quot;thumb_geometry&quot;]
       thumb_path = item.thumb(:width =&gt; width, :height =&gt; height, :geometry =&gt; geometry).public_filename
       width, height, size, geometry = tag.attr[&quot;image_width&quot;], tag.attr[&quot;image_height&quot;], tag.attr[&quot;image_size&quot;], tag.attr[&quot;image_geometry&quot;] 
       image_path = item.thumb(:width =&gt; width, :height =&gt; height, :geometry =&gt; geometry).public_filename 
-      li_start_tag = tag.attr[&quot;thumbnail&quot;] == 'none' ? '&lt;li&gt;' : %{&lt;li style=&quot;background-image: url('#{thumb_path}')&quot;&gt;}       
+      li_start_tag = tag.attr[&quot;thumbnail&quot;] == 'none' ? &quot;&lt;li#{klass}&gt;&quot; : %{&lt;li style=&quot;background-image: url('#{thumb_path}')&quot;#{klass}&gt;}       
       content &lt;&lt; %{ #{li_start_tag}     
                     &lt;a href=&quot;#{image_path}&quot; rel=&quot;lightbox[#{gallery.name.downcase.gsub(/[^-a-z0-9~\s\.:;+=_]/,'')}]&quot; title=&quot;#{item.name}&quot;&gt;
                     #{item.name}    </diff>
      <filename>lib/gallery_lightbox_tags.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7de311bf87f2a0c296ef3a21dca35a79bb6fa3e2</id>
    </parent>
  </parents>
  <author>
    <name>Tom Cowell</name>
    <email>tc@eightsquarestudio.com</email>
  </author>
  <url>http://github.com/pilu/radiant-gallery/commit/ce5dedcfdf4a59c95b8d34777bd4f1cb3fad3eb5</url>
  <id>ce5dedcfdf4a59c95b8d34777bd4f1cb3fad3eb5</id>
  <committed-date>2009-06-19T06:49:09-07:00</committed-date>
  <authored-date>2009-05-05T15:24:18-07:00</authored-date>
  <message>adding limit to count of lightbox_tag and class to li

Signed-off-by: Andrea Franz &lt;andrea@gravityblast.com&gt;</message>
  <tree>b6bacb8a32cf02c7853e3f16f98a1754abc9e2b4</tree>
  <committer>
    <name>Andrea Franz</name>
    <email>andrea@gravityblast.com</email>
  </committer>
</commit>
