Agile Web Development

Build it. Launch it. Love it.

Lightbox

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):

<%= javascriptincludetag :defaults %>

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

<%= stylesheetlinktag 'lightbox' %>

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

<%= lightboxlinkto "Link Name", "/path/of/your/image.png" %> or <%= lightboximagetag("/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 imagetag and linkto.

Vist my website: http://blog.lipsiasoft.com

Vitals

Home http://rails.lipsiasoft.com/wiki/lightbox
Repository git://github.com/Lipsiasoft/lightbox.git
License Rails' (MIT)
Tags Tag_red gallery helper images LightBox LightBox lipsiablog popup
Rating (126 votes)
Owner Davide D'Agostino (DAddYE)
Created 5 June 2007

Comments

  • Avatar
    Max
    11 June 2007

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

  • 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.

  • sledziu
    26 June 2008

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

  • Avatar
    Amit
    1 July 2008

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

  • Avatar
    2 July 2008

    sledziuz,

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

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

  • Avatar
    26 July 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 :)

  • Avatar
    Venkat
    13 October 2008

    Hello.. can u pls check out the repository. I have been trying to install the plugin, but facing this problem

    sh: git: command not found

    Pls Help.

    Thanks, venkat

  • Avatar
    Venkat
    13 October 2008

    Hello.. can u pls check out the repository. I have been trying to install the plugin, but facing this problem

    sh: git: command not found

    Pls Help.

    Thanks, venkat

  • Avatar
    venkat
    13 October 2008

    Repository: git://github.com/Lipsiasoft/lightbox.git link does't work

    Pls Help

    Venkat

  • Saideep
    30 October 2008

    @venkat: try this script\plugin install http://github.com/Lipsiasoft/lightbox.git/

  • Michael Lawler
    11 November 2008

    Re: the issue with the close icon not displaying, i just open the lightbox.js code and changed the closelabel url to be absolute rather than relative. Seems to work for me.

  • Avatar
    Zeba
    18 February 2009

    Hi.. I want to know...whether lightbox can be used to show anything other than images??? Can I show some forms..or a div with some text in a lightbox??? If yes.. How can I do that??? Thank You..

Add a comment