<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Musings of a Trained Monkey: Tag lightbox</title>
    <link>http://www.stevelongdo.com/articles/tag/lightbox</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Lightbox V2 integration with Typo...</title>
      <description>It was brought to my attention that I didn't post a lot of detail about integrating &lt;a href="http://www.typosphere.org"&gt;Typo&lt;/a&gt; with Version 2 of &lt;a href="http://www.huddletogether.com/projects/lightbox2/"&gt;lightbox&lt;/a&gt;.
I'll attempt to correct that with a quick write up. &lt;br/&gt;&lt;br/&gt;Start by downloading the most recent &lt;a href="http://www.huddletogether.com/projects/lightbox2/"&gt;lightbox&lt;/a&gt; release.  From here we will want to copy the images that are distributed with it into our &lt;a href="http://www.typosphere.org"&gt;Typo&lt;/a&gt; installation's &lt;cite&gt;public/images&lt;/cite&gt; folder.&lt;br/&gt;&lt;br/&gt;
Next up is the javascript file and the stylesheet.  I have made some slight modifications to the originals to make the image paths non-relative and the additon of links that show in the caption portion of the light box.  Grab the following &lt;a href="http://www.stevelongdo.com/javascript/lightbox-modded.js "&gt;javascript file&lt;/a&gt; and put it in your &lt;cite&gt;public/javascripts&lt;/cite&gt; directory.  Then get the &lt;a href="http://www.stevelongdo.com/public/stylesheets/lightbox.css"&gt;css file&lt;/a&gt;  and put it in your &lt;cite&gt;public/stylesheets&lt;/cite&gt; directory.
&lt;br/&gt;&lt;br/&gt;Final step for usage is to place a couple of lines in your active theme's &lt;cite&gt;layout/default.rhtml&lt;/cite&gt;.  Under the &lt;%= page_header %&gt; line place the following two lines:&lt;pre&gt;&lt;code class="ruby2"&gt;&lt;%= javascript_include_tag "lightbox-modded"  %&gt;
&lt;%= stylesheet_link_tag "/stylesheets/lightbox" %&gt;&lt;/code&gt;&lt;/pre&gt;
This should get you up and running with lone imgs &lt;br&gt;&amp;lt;img src="..." rel="lightbox"/&gt;&lt;br/&gt; and/or groups of imgs &lt;br&gt;&amp;lt;img src="..." rel="lightbox[groupName]"/&gt;&lt;br&gt;&amp;lt;img src="..." rel="lightbox[groupName]"/&gt; </description>
      <pubDate>Tue, 23 May 2006 11:31:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:91619361-8306-4412-b318-37237859704f</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/05/23/lightbox-v2-integration-with-typo</link>
      <category>ruby</category>
      <category>typo</category>
      <category>javascript</category>
      <category>lightbox</category>
    </item>
    <item>
      <title>Lightbox V2 and the flickr sidebar...</title>
      <description>So to grant the flickr sidebar access to the powers of the lightbox script is a fairly simple trick, in your theme's &lt;cite&gt;views/plugins/sidebars/flickr/content.rhtml&lt;/cite&gt;
file (you can make this path and the file if it is not present in your particular theme.)
&lt;br&gt;
&lt;pre&gt;&lt;code class="ruby2"&gt;
&amp;lt;% &lt;span class="keyword"&gt;if&lt;/span&gt; @flickr -%&amp;gt;
&amp;lt;h3&amp;gt;&amp;lt;%= @flickr.title  %&amp;gt; &lt;span class="bracket"&gt;(&lt;/span&gt;&amp;lt;%= link_to &lt;span class="string"&gt;"flickr"&lt;/span&gt;, @flickr.link %&amp;gt;&lt;span class="bracket"&gt;)&lt;/span&gt;&amp;lt;/h3&amp;gt;

&amp;lt;div id=&lt;span class="string"&gt;"flickr"&lt;/span&gt;&amp;gt;
&amp;lt;% &lt;span class="keyword"&gt;for&lt;/span&gt; pic in @flickr.choose&lt;span class="bracket"&gt;(&lt;/span&gt;count.to_i&lt;span class="bracket"&gt;)&lt;/span&gt; -%&amp;gt;
  &amp;lt;div &lt;span class="keyword"&gt;class&lt;/span&gt;=&lt;span class="string"&gt;"flickr&amp;lt;%= format%&amp;gt;"&lt;/span&gt;&amp;gt;

&amp;lt;%= &lt;span class="keyword"&gt;case&lt;/span&gt; format
          &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="string"&gt;'square'&lt;/span&gt;:
            link_to image_tag&lt;span class="bracket"&gt;(&lt;/span&gt;pic.square, &lt;span class="symbol"&gt;:alt =&amp;gt; pic.title&lt;/span&gt;&lt;span class="bracket"&gt;)&lt;/span&gt;,
              pic.image.gsub!&lt;span class="bracket"&gt;(&lt;/span&gt;/_m/,&lt;span class="string"&gt;''&lt;/span&gt;&lt;span class="bracket"&gt;)&lt;/span&gt;,
              { &lt;span class="symbol"&gt;:rel =&amp;gt; 'lightbox[flickr]',:alt =&amp;gt; pic.title, :title =&amp;gt; pic.title&lt;/span&gt; }
          &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="string"&gt;'rectangle'&lt;/span&gt;:
            link_to image_tag&lt;span class="bracket"&gt;(&lt;/span&gt;pic.thumb, &lt;span class="symbol"&gt;:alt =&amp;gt; pic.title&lt;/span&gt;&lt;span class="bracket"&gt;)&lt;/span&gt;,
              pic.image.gsub!&lt;span class="bracket"&gt;(&lt;/span&gt;/_m/,&lt;span class="string"&gt;''&lt;/span&gt;&lt;span class="bracket"&gt;)&lt;/span&gt;,
              { &lt;span class="symbol"&gt;:rel =&amp;gt; 'lightbox[flickr]',:alt =&amp;gt; pic.title, :title =&amp;gt; pic.title&lt;/span&gt; }
          &lt;span class="keyword"&gt;end&lt;/span&gt;

 %&amp;gt;
&amp;lt;/div&amp;gt;
  &amp;lt;% &lt;span class="keyword"&gt;end&lt;/span&gt; -%&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;% &lt;span class="keyword"&gt;end&lt;/span&gt; -%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Tue, 23 May 2006 06:57:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:81c43cc7-42fb-41ac-b897-7dc52d701264</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/05/23/lightbox-v2-and-the-flickr-sidebar</link>
      <category>lightbox</category>
      <category>flickr</category>
      <category>typo</category>
      <category>rails</category>
    </item>
    <item>
      <title>Lightbox V2 rocks...</title>
      <description>Seriously cool update to the &lt;a href="http://www.huddletogether.com/projects/lightbox2/"&gt;lightbox script&lt;/a&gt;.  Lokesh has has outdone himself.  I altered &lt;a href="http://www.flickr.com/photos/slongdo/"&gt;my flickr sidebar&lt;/a&gt; to use the new version of &lt;a href="http://www.huddletogether.com/projects/lightbox2/"&gt;lightbox script&lt;/a&gt;.  Hovering over the image on the the left or right will let you scroll through the pics on the sidebar in all their glory!&lt;br /&gt;&lt;br /&gt;
Now when you click on a photo, it opens up... Just try it already!</description>
      <pubDate>Fri, 31 Mar 2006 17:08:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:02d3e276-da17-4409-891a-7e9cb3c471c8</guid>
      <author>Steve Longdo</author>
      <link>http://www.stevelongdo.com/articles/2006/03/31/lightbox-v2-rocks</link>
      <category>lightbox</category>
      <category>flickr</category>
      <category>photo</category>
      <category>scriptaculous</category>
    </item>
  </channel>
</rss>
