Plugins - LightBox Helper

StarAdd to favorites

[updated] Work in Rails 2.0. Build with Lightbox v2.03.3 Now You can use images in a serie Better default images ;)

This LightBox Helper is based on the lastest javascript http://www.huddletogether.com/projects/lightbox2/

It’s only make an helper, copy the lastest javascripts, css, and images on your public/javascript directory and register the javascript in the AssetTagHelper of rails, so for include the javascript in your page you only can add this (if you havn’t yet):

<%= javascript_include_tag :defaults %>

You must add also the stylesheet so add this on your page head:

<%= stylesheet_link_tag ‘lightbox’ %>

The is very simple for add a LightBox in your page add this:

<%= lightbox_link_to "Link Name", "/path/of/your/image.png", "Album Name" %> or

<%= lightbox_image_tag("/path/of/your/image-thumb.png", "/path/of/your/image.png", {:class=>"images"}, :title => "This is a test!") %>

You can add, title, controller, action what do u whant becaue it’s based on image_tag and link_to

Please contribute submitting fatures and bug here: http://rails.lipsiasoft.com/wiki/lightbox

Davide D'Agostino (DAddYE)

http://rails.lipsiasoft.com/projects/show/lightbox

git://github.com/Lipsiasoft/lightbox.git

Rails' (MIT)

  • Currently 4.7/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

View Extensions

Tags

Comments

Add a comment
Dolný Kubín 26 Jul 2008

watch out if you use flash on website when using lightbox. You have to set flash param - window to transparent, otherwise flash will overlay image in lightbox. Took few hours to figure it out :)

DAddYE 2 Jul 2008

sledziuz,

sorry I've updated the repos, now we are on git

git://github.com/Lipsiasoft/lightbox.git

Amit 1 Jul 2008

Repository: http://svn.lipsiasoft.com/lightbox link does't work

sledziu 26 Jun 2008

Repository: http://svn.lipsiasoft.com/lightbox link does't work

Keith 13 May 2008

This is a great plugin - thanks! I did, however, come across a problem with the display of the LightBox 'close' and 'loading' images in the situation where the rails app is not at the root of the webserver - caused by the use of absolute URLs for those graphics - e.g '/images/lightbox/close.gif'. A hacky soln for now is to add this code snippet after the inclusion of the lightbox javascript: <script type="text/javascript"> var fileLoadingImage = "<%= image_path("lightbox/loading.gif") %>"; var fileBottomNavCloseImage = "<%= image_path("lightbox/close.gif") %>"; </script> Its not pretty but it works.

Max 11 Jun 2007

I Haven't tried it yet, but this looks really simple and slick.

Search Plugins

Query syntax

Plugins by Category

Sponsors

Rails Kits: Get Code. Get Moving.

Have a comment?