Lightbox integrated

CG eyeThanks to Sean McBride’s article I have been able to integrate Lightbox JS into my Hemingweb 2.0 theme quite easily. To try it out, just click on a thumbnail like the one on the right, and watch the magic.

I edited the FlickrRSS plugin so it also makes use of this snazzy effect.

This entry was posted in this blog, web dev. Bookmark the permalink.

30 Responses to Lightbox integrated

  1. Tron says:

    Exellent mods!
    I love flickr rss and lightbox!

    How did you manage to link to the photo’s source url
    instead of the page on Flickr with the photo on it?

    Could you please release a plugin or tell us how to do it? :-)

    Its exactly what I am looking for!

  2. ad says:

    In flickrrss.php, find this:

    $url = $item[\'link\'];

    and replace with:

    $url = str_replace(\"_m.jpg\", \".jpg\", $imgUrlMatches[1]);

    that should do it! ;-)

  3. Tron says:

    Thanks! I had to remove the slashes, and it worked.
    $url = str_replace(“_m.jpg”, “.jpg”, $imgUrlMatches[1]);

    It linked directy to the photo on flickr like i wanted,
    but my lightboxplugin dont work on the links in flickrrss :-(
    It just opens the one image on the same page.

    Any ideas?
    Thanks again!

  4. ad says:

    find the two lines that start with
    print $before_image
    and add rel="lightbox" to the echoed links (see LightBox manual).

  5. Tron says:

    Yes.. I figured it out myself. Thanks!
    I am now wondering how I can get the pictires in the rss to also belong to a set.
    As seen here: http://www.fotosdecalle.com.ar/

    Do I apply another rel?

  6. Tim says:

    Do you have the modified code i’m getting parsing errors

  7. ad says:

    Tron: fotosdecalle.com.ar uses Lightbox2 – I use version 1, which does not support “sets”.

    Tim: what errors?

  8. Hi Gaarf, I have same parser error, when I put rel=”lightbox”

    take a look the code here:
    http://blog.claudiolobos.com/wp-content/uploads/code.gif

    and take a look my parser error:
    http://blog.claudiolobos.com/wp-content/uploads/error.gif

    I try with making: $lightbox = “lightbox” and then :
    rel=\”$lightbox\”

    thanks for any help!

  9. Tron says:

    Well I did not understand why, but here is mine:
    http://www.box.net/public/eucxpmece0

    works for me :-)

  10. Thanks !
    I download your file (flickrrss.php) and now works fine.

    Gracias!

  11. Fred says:

    Beautiful Tron, thank you!

  12. MGO says:

    Tron: thanks for the upload!!

  13. Avi says:

    Hi there,

    I have this mod sort of working. It works but it doesn’t fade the background. Also I don’t get the menu to navigate (prev, next, close) I had it working on my photo page http://blogs.garrettsite.ca/flickr but not on my main page with Flick RSS http://blogs.garrettsite.ca/ can someone help me please and tell me what am I doing wrong?

  14. ad says:

    Avi: you need to add rel=”lightbox” to your img anchors. Also, H20′s “all.compressed.js” file includes all the necessary scripts. No need to include scriptaculous, prototype nor lightbox as you seem to be doing.
    Hope this helps!

  15. Avi says:

    Got it to work thanks ad. 2 things:
    1) How do I customize the Flickr Photos section with borders, spacing, etc?
    2) On the light box effect, how do I add the next and prev buttons. I want to be able to scroll through the pics rather just close and then click on another.

    Thanks,

    Avi

  16. ad says:

    To customize looks of the Flickr Photos sections, you can use the .flickrrss CSS class:

    span.flickrrss {
    border:1px solid #333333;
    margin:0 1px 1px 0;
    display:block; float:left;
    }
    span.flickrrss a {
    padding:0;
    background-image:none;
    }

    As for next/previous and sets, as explained in another comment, that requires version 2 of Lightbox JS. I use version 1, so you’re on your own there…

  17. Avi says:

    Hi ad where do I find .flickrrss CSS class? Sorry for being so stupid.

  18. Avi says:

    I should be more specific that I am using user_styles_gaarf.css and it has already has this. I tried changing the values but no effect on the Flickr section.

  19. ad says:

    Login to your WP as admin, and go to Options/FlickrRSS.
    Make sure you have [span class="flickrrss"] and [/span] in Before/After, respectively.
    (replace the square brackets with greater-than and less-than)

  20. Avi says:

    Thanks man! that worked beautifully!

  21. Jamie says:

    Many thanks?:)

  22. Bramick says:

    ad,
    I’m working on incorporting your skin with the falbum plugin. I’m getting a conflict between the plugin and the all.compressed.js file. The error is “this.el.style has no properties” which can be seen on http://www.blakeramick.net/journal/portfolio/album/portfolio-overview/ This error causes the page to load then disappear on IE 6 & 7.

    When I removed the code from the all.compressed.js the album page works, but obviously the lighbox doesn’t. Any suggestions? I can’t verify which line of code in this file is causing the problem since it’s one huge line.

    Could I get an uncompressed version from you or possibly some insight into how to fix this. In the meantime if I figure it out I’ll be sure to pass along the fix.

  23. Bramick says:

    It looks as though there has been some updates to the files:
    http://mootools.net/download/
    Which ones do I need to upate your version of the compressed file?

  24. ad says:

    Bramick: the uncompressed files are in the zip archive, same directory as all.compressed.js – I am using version 1.2.3 of moo.fx ;-)

  25. Simon says:

    Hey, nice stuff!! thanks!

    I am not using Flickrss yet, just testing the LightBOX JS, how can I get thumbnail pic??

    I can only get a link to work but not clicking on thumbnail and goto enlarged pic like you have

  26. Simon says:

    I just got it to work! hee I am loving it!

  27. adastra says:

    Do you by any chance know how can I use that Flickr RSS Lightbox if I don’t have WordPress – just as a plain PHP thing?

  28. ad says:

    adastra: sure. just use something like http://www.thebishop.net/code/getflickrphp.txt and plug-in the latest lightbox.js from http://www.huddletogether.com/projects/lightbox2/

    or you could just use the “real” flickr badge: http://www.flickr.com/badge.gne

  29. Paul says:

    I had thr same problem as some here and downloading the flickrrss.php available here fixed my problems. My lightbox 2 effect wasn’t opening the picture but the page so it wasn’t working right.

    For some reason for the longest time I couldn’t get my user pics. I would choose USER and put my correct user ID etc but it wouldn’t work. Then all of a sudden it did work. Go wonder..

    Now my problem is that I only get 1 picture on my site. If I put GROUP then I get the amount of pics specified in the options but when I go back to USER I only get 1 picture…
    would anyone know why ?

  30. qwik says:

    Can someone assist me with turning the description (that is under the popup of the image) into a link that goes back to the image on flickr?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>