The MU forums have moved to WordPress.org

Lightbox hack anyone? (20 posts)

  1. ryanfitzer
    Member
    Posted 18 years ago #

    I've emailed the author on Lightbox 2.0 to see if there is any way of getting going with MU. No reply yet. Search had nothing either. Has anyone out there successfully gotten LightBox running?

  2. drmike
    Member
    Posted 18 years ago #

    And lightbox 2.0 would be?...

  3. andrea_r
    Moderator
    Posted 18 years ago #

    Many developers out there, even of things for WP, are not familiar with MU. You're probably going to have to figure it out yourself.

  4. drmike
    Member
    Posted 18 years ago #

    Might help us help you if you told us what your issue with it was. (As well as provided a link. Google shows a couple different things.)

  5. ryanfitzer
    Member
    Posted 18 years ago #

    Sorry, saw a thread that mentioned Lightbox and figured it might be familiar to the forums.

    Here is a link the the plugin site:
    Lightbox2

    Here is a test install with the plugin. Viewing the source in the head shows that the plugin is looking for the plugin directory in the wrong place. And the plugin's admin page does not show up in the dashboard. I'm not experienced enough to revise this to get it to work. Any advice would be appreciated. Thanks

  6. unreachable
    Member
    Posted 18 years ago #

    you just need to unpack the plugin to mu-plugins (the lightbox-plugin folder and lightbox-plugin.php) and it works without modifying anything...

    I've success just doing that...

  7. suleiman
    Member
    Posted 18 years ago #

    for me it works in the plugins dir but not in the mu-plugins dir. You sure you didn't modify anything unreachable? What setup are you running and which nightly? I'm on RC4...I think.

    EDIT: I spoke to soon. The latest versions of lightbox2 require editing since they are hardcoded to point to /plugins instead of /mu-plugins. Simply open lightbox-plugin.php and edit 2 references to /plugins and you should be set to jet!

  8. ryanfitzer
    Member
    Posted 18 years ago #

    I'm on it. I let you know what I come up with. Thanks

  9. ryanfitzer
    Member
    Posted 18 years ago #

    It's putting the user's directory into the path. I've got WPMU set up to use sub-directories instead of sub-domains. Here's the comment it prints in my source:

    <!-- Lightbox 0.6 Plugin: THERE WAS AN ERROR FINDING YOUR PLUGIN DIRECTORY -->
    <!-- I checked at: /kunden/homepages/7/d108259525/htdocs/wpmu/cjagers/wp-content/mu-plugins/lightbox-plugin/ -->
    <!-- and also at: /kunden/homepages/7/d108259525/htdocs/wpmu/cjagers/wp-content/mu-plugins/lightbox-plugin/ -->
    <!-- Go to 'Administration > Options > General' and try to fix the URL settings. -->

  10. ryanfitzer
    Member
    Posted 18 years ago #

    Thanks everyone. Suleiman, I went in and looked around and found what it needed somewhat based on what you wrote. I had to hard code the path and take out the variable that was inserting the username into the path. Looks like this:

    // first pass

    $lightbox_pluginpath = "/wpmu/wp-content/mu-plugins/lightbox-plugin/";

    $lightbox_dir = $currentpath.str_replace('http://ryanfitzer.com/wpmu','',$lightbox_pluginpath);

  11. ryanfitzer
    Member
    Posted 18 years ago #

    With it being in the mu-plugins (automatic activation for all blogs) I loose out on the admin page. Not a big deal at this point though. Thanks again.

  12. suleiman
    Member
    Posted 18 years ago #

    you know ryan, I found it just as easy to activate it on everyone's blog using the plugin manager.

    In the end I had just tested it in the mu-plugins directory last, so that's where I left it, but I'd be happy keeping it in either.

  13. ryanfitzer
    Member
    Posted 18 years ago #

    Tried that as well (before I alterd things). Still got the same error. But it's good to know. Maybe I was doing something incorrectly. I would love to see a way to activate plugins in the site admin similar to the way one can activate themes (which is so great BTW). I just need to get those php skillz goin...

  14. Melodiefabrieknl
    Member
    Posted 17 years ago #

    Lightbox plugin refers to plugins folder instead of mu-plugins. Change lightbox2.php for the headers and also change the lightbox.js files. Make sure all plugins referers are changed to mu-plugins instead. That's all.

  15. Ovidiu
    Member
    Posted 17 years ago #

    do users still have to "manually" edit their posts to work with this plugin? I remember the imagemanager plugi nworked with lightbox - not sure if it works with lightbox 2.0 or 2.2 - maybe ther is another imagemanager plugin which uses these versions automatically?

  16. suleiman
    Member
    Posted 17 years ago #

    actually no Ovidiu. That's one of the benefits to using this plugin. Basically, and on most themes, where an image would normally pop up a new browser window, the Lightbox plugin is called and the image is loaded into that frame.

    Once again it doesn't work with every theme sadly, but I would venture it works on 80%, which is a high success rate on an MU install.

  17. Ovidiu
    Member
    Posted 17 years ago #

    you mean when using the imagemanager plugin, it also works with lightbox 2 or 2.2 ?

  18. dizzy99
    Member
    Posted 17 years ago #

    I tried all of the lightbox plugins Ovidiu and pretty much all of them work out of the box. I recall one, can't recall its name however, that had a slight path issue that was an easy edit.

    As regards how to use it all you do is put in a rel=”lightbox” in your image links, easy as pie. You can even link images, forming a lightbox gallery by adding a groupname so something like rel=”lightbox[test]” for each of your images creates a group called test which allow next and previous to work between images, just like a gallery.

    I eventually went with this one

    http://www.stimuli.ca/lightbox

    And i'm very happy with it after editing some of his CSS to fit my needs better.

    I just noticed he's updated it too :) woohoo, so i'll have to upgrade because its now offering navigation keys which is very handy.

    I see this as a great solution to providing my members with a gallery of sorts.

    As regards the imagemanager plugin, which btw is extremely cool, this puts in the rel="lightbox" for you :)

  19. gighen
    Member
    Posted 16 years ago #

    [i know this is an old thread]

    but i just installed this plugin and it work for single-post-page but not in the excerpt?? is because i'm using the_excerpt_reloaded?

  20. boonika
    Member
    Posted 16 years ago #

About this Topic

  • Started 18 years ago by ryanfitzer
  • Latest reply from boonika