Using lightbox.js with file_column is a piece-o-cake.
Within the head, add in the defaults so we can use protoype, which is required by lightbox.js and add in the css and js for lightbox.
<%= javascript_include_tag :defaults %><br /> <%= javascript_include_tag "lightbox" %><br /> <%= stylesheet_link_tag "lightbox", :media => "all" %><br />
In the view:
<% @images.each do |image| %><br />    <a href="<%= image_path(url_for_file_column(image, "image")) %>" rel="lightbox" title="<%= h(image.caption) %>"><br />    <%= image_tag url_for_file_column(image, "image", "thumb") %> </a><br /> <% end %>
Watch any onload conflicts between lightbox and any other javascripts. That had me scratching my head for a few minutes. If there's a conflict, simply add to your body tag onload="initLightbox()" and that will do it.
Now grab a glass of milk and finish your cake. Non-fat if you sit in front of a monitor all day.









On Sunday, Jun 4
Using lightbox.js with file_column is a piece-o-cake.
Within the head, add in the defaults so we can use protoype, which is required by lightbox.js and add in the css and js for lightbox.
In the view:
Watch any onload conflicts between lightbox and any other javascripts. That had me scratching my head for a few minutes. If there's a conflict, simply add to your body tag onload="initLightbox()" and that will do it.
Now grab a glass of milk and finish your cake. Non-fat if you sit in front of a monitor all day.
On Saturday, Aug 5
Not only was this very handy just now (it's my first time using lightbox AND FileColumn), but it was posted on my birthday.
The only issue was you forgot to put the full-size image link in the anchor tag.
On Monday, Aug 7
Well then, Happy Birthday Gabe!!
I don't follow you. The full size image is returned with image_path in the href tag. It works fine in my scripts. If you find it different, please post your code.
On Saturday, Sep 9
I am having a strange problem with image uploads; on the remote server file_column uploads only gif images. If I try to upload JPG/PNG then it gives an error “File invalid image†but if I click on submit button again then it uploads it.
However, it works well on my local machine.
Any ideas why it isn’t working?
On Saturday, Sep 9
Then the server you are on does not have libjpeg and libpng installed on it. If you're on a dedicated, get those and install them or on a shared ask your host to install them for you.
On Thursday, Sep 21
Yes, the missing libjpeg and libpng is the problem.