Autoload feature not working

Forums Forums Slimbox2 plugin Autoload feature not working

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #595
    Anonymous
    Member

    First things first–thank you for taking the time to make slimbox2 into a WP plugin!  Your hard work is evident.  I almost have this thing working!  I’m trying to replace my slimbox1 plugin, which worked great except for one problem: the autoload function counted all images on the entire page, rather than just within a single post.  This is why I’ve decided to try your slimbox2 plugin–so the ‘gallery’ feature you’ve programmed will only show/count the images in a specific post.

    That being said, I get the plugin to work well when I have the autoload option DISABLED and I hand-code ‘ rel="lightbox-…" ‘ into every photo link.  However, when I try to ENABLE the autoload feature, the pictures open in a blank window when clicked (the WP default action).  I’ve noticed several others having similar problems, but I haven’t seen a consistent solution.  I’ve toyed with the slimbox2_autoload.js.php file, to no avail.  Finally I deactivated then deleted/reinstalled the plugin after deactivating all other plugins, to no avail.  Any suggestions?  The slimbox1 plugin worked flawlessly, other than not restricting the image count to a specific post.

    Here’s an example, in which I have autoload ENABLED.  I’ll probably be switching back to the working slimbox1 plugin in a day or two if I can’t find a resolution…

    http://www.aggiesterlings.com

    #5094
    malcalevak
    Moderator

    Phillip, thanks for the kind words. Slimbox1 and Slimbox2 were both written by the same author, though at the prompting of others I revised the autoloading code to do the by post/page groups (and at least two people provided code suggestions as well).

    I find it strange that the slimbox1 plugin didn’t have the same issues mine is having, though it’s possible he tweaked the loading code himself.

    I believe I know what’s causing the problem, though I’m not sure I know how to fix it. If you’ll notice, all your image links appear to have custom sizing addendums to them (ie IMG_4385.jpg&h=500 the bit after the .jpg). When I cut that out of the link, the images worked just fine, except they loaded at the incredibly massive size, which is obviously not what’s wanted. I believe/hope this is a relatively easy fix, and it just requires someone who knows how to modify the jQuery code, but I guess we’ll see.

    In the meantime, if there’s another way to easily post images at a reasonable size, I’d recommend that instead, but I’m still going to try and diagnose this issue. I’m still personally a fan of using rel=’lightbox’ links as it’d give more direct flexibility in setting exactly what you want, but I understand that’s time consuming in cases where the gallery implementation being used doesn’t add them.

    I’ll keep you posted.

    #5095
    Anonymous
    Member

    Sorry I forgot to include that tidbit of info for you!  I pass the sizes because I’m incorporating ZenPhotoPress plug-in as well as a slightly-modified version of slimbox1, and I didn’t want my wife to have to upload both the full-res photo (for folks to order) and a scaled-down version as well.  This setup I concocted was working just fine with slimbox1 for some reason.  Just in case it will help you diagnose, I’ve reverted to slimbox1 so you can see how it functions:

    http://www.aggiesterlings.com

    Thanks again for your help.  I can’t wait to get this working properly!!

    #5096
    Anonymous
    Member

    Forgot to include one thing in the last post:

    When you visit my site utilizing slimbox1/ZenPhotoPress, you’ll notice the photo count says ~32 images, which is the total count on the page (not including the flash movies).  Basically, all I’m really wanting for improvement is to limit the count/display to only the images in that particular post.

    #5097
    malcalevak
    Moderator

    That’s interesting, it appears the plugin your using is parsing the entire post and manually inserting the rel=’lightbox[roadtrip]’ on each image link. This seems like it would be horribly inefficient to me, but I could be mistaken.

    Regardless, it’s not an option I’d consider for my plugin – BUT – I think it is possible to adjust the filter, though I’ll need some time to mess around with it myself. Ultimately I might ask Christophe, the Slimbox creator, if he could adjust the script to compensate, but I’d like to give it a shot myself first. Unfortunately, that means it might take more than a few days.

    On the plus side, unless I’m wrong, and it can’t be done without a massive code rewrite or something on the php level, once it is done it’ll slim down your frontpage (it appears to be the only plugin using the mootools framework, where as several others already use jQuery) and provide you with a more enhanced slimbox interface.

    Check back, or if you come up with something on your own feel free to share it.

    #5098
    Anonymous
    Member

    You’re correct, the plugin I’m using (slimbox plugin 1.3 by Peppe Argento) seems to parse every link and preg_replace with the rel="lightbox" code.  Maybe that’s why I couldn’t find where to add the same line to your plugin, since it evidently works differently (i.e. more efficiently)!

    Just in case it’s unclear to you, when I add a photo to WP (via ZenPhotoPress), my image code looks like this:

    href="http://www.aggiesterlings.com/gallery/zp-core/i.php?a=Alyssa/week-4&i=IMG_4210.jpg&h=500"

    It’s telling the i.php file to dynamically-resize IMG_4210 to a height of 500 (to play nicely with the slimbox plugin, which can’t automatically-resize images).  This is why I need the autoload feature to look for links ending in either ".jpg&h=500" OR ".jpg&w=500" rather than simply ".jpg" or ".png"  It seems like it would be quite easy to do with your plugin.  Hopefully this clears up very concisely what my problem is and what solution is needed…

    #5099
    malcalevak
    Moderator

    Yeah, I got that, but i don’t want to look exclusively for .jpg&w=500 or h=500, or whatever, I need to figure out the regular expression for .jpg and additional stuff before the close bracket. Unfortunately I’m not especially good with regular expressions, so I want to make sure I come up with a proper solution, as opposed to just an adequate solution.

    That’s why it might take me a little while, unless I get some assistance.

    #5100
    malcalevak
    Moderator

    Just thought I’d update that I think I’ll have an acceptable modification for you to use for this tonight, though the official release might be a few more days as I iron out my regular expression.

    #5101
    malcalevak
    Moderator

    This feature has now been implemented in the development version available at: http://downloads.wordpress.org/plugin/wp-slimbox2.zip

    On the off chance your reading this and 15 minutes hasn’t past since posting, the version may not have refreshed, but it will shortly.

    Let me know how it works out.

    #5102
    malcalevak
    Moderator

    Actually, I think I’m gonna go ahead and do another release. I’ve added a number of new, if somewhat minor, features/tweaks to warrant one.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.