WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery Optimizer
[resolved] singlepic not working (3 posts)

  1. Juanfrito
    Member
    Posted 9 months ago #

    Hello.

    Until now I had NextGEN Gallery Optimizer, working fine. I purchased and installed Optimizer Professional, and tried the [singlepic] shortcode.

    It doesn't work for me. Gallery shortcode works fine, but if I use, for example:
    [singlepic id=484 w=320 h=240 float=]
    I can see a link with the image title, but not the image itself. The link works fine, if I click on it then Fancybox loads the image perfectly. The only thing I'm missing is the thumbnail.

    The source code generated for the image is this (sorry, I had to add a + between & and amp; because otherwise the forum system shows only the &):

    <a href="http://www.emsirinx.com/eve/wp-content/gallery/2/11-08-2012/dia11-63.jpg" title="Concierto de profesores en Soncillo" class="myfancybox" rel="singlepic484" >
    	<img class="ngg-singlepic" src="http://www.emsirinx.com/eve/index.php&+amp;callback=image&pid=484&+amp;width=320&+amp;height=240&+amp;mode=" alt="Concierto de profesores en Soncillo" title="Concierto de profesores en Soncillo" />
    </a>

    I tried loading http://www.emsirinx.com/eve/wp-content/gallery/2/11-08-2012/dia11-63.jpg, and works fine, but when I try http://www.emsirinx.com/eve/index.php&+amp;callback=image&+amp;pid=484&+amp;width=320&+amp;height=240&+amp;mode= it doesn't work.

    If I try to visit the link directly I get a blank page. If I change every &+amp; into & I get an error (with Firefox: the image cannot be displayed because it contains errors, with iExplorer or Chrome I just get a broken image icon). If I use Firefox Debugger I guess WordPress is trying to send the image, because I can see something like this (I'll copy just two lines):

    ÿØÿàJFIFÿþ<CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 100
    ÿÛCÿÛCÿÀÖ@"ÿÄ

    Wich seems to be raw jpeg data, but I don't know why the browser can't display it.

    I'm using WordPress 3.5.1 multisite, last version of both NextGEN Gallery, and Optimizer Pro. If I insert a Gallery or Album everything works fine. If I insert a single image using the "Add media" button, I can look the image up and insert it perfectly, but only a tiny thumbnail or the full image, that's why I'm trying with [singlepic] shortcode.

    Any idea?

    http://wordpress.org/extend/plugins/nextgen-gallery-optimizer/

  2. Juanfrito
    Member
    Posted 9 months ago #

    Just an update:

    I found some solution elsewhere, and just added some code in ms-files.php, just at the end, where it says:

    // If we made it this far, just serve the file
    readfile( $file );

    I inserted ob_clean();

    // If we made it this far, just serve the file
    ob_clean();
    readfile( $file );

    Now everything works fine ONLY if I publish the post or the page, but not if I try to save a draft and preview it.

    So I guess there's something not solved there, but at least my users will be able to see everything.

  3. Mark Jeldi
    Member
    Plugin Author

    Posted 8 months ago #

    Hi Juan,

    Thanks for using NextGEN Gallery Optimizer Premium!

    That's great to hear you've found a workaround, though I'm curious as to what caused the issue, as I've never seen this before.

    Was it your homepage that was experiencing the issue? [http://www.emsirinx.com/eve/] It's a little unclear from your posts above, and there doesn't appear to be any singlepic shortcodes present on that page.

    My only thought at this stage is that the shortcode you've quoted might be causing an issue as the "float" attribute is undefined. Additionally, the "mode" attribute appears to be declared, yet undefined in your example HTML. Maybe you could try using the following...

    [singlepic id=93 w=100 h=69 float=left mode=web20]

    Cheers,
    Mark.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.