WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] Singlepic Insert Code Change Suggestion (4 posts)

  1. tnolte
    Member
    Posted 5 years ago #

    I'd like to make a submission that the "Insert Post" code for a "singlepic" be changed to be more inline with the fullsize insert post code. When you do a full size it actually inserts the <img> tag and not just a shortcode. Here's the code that I changed it to:

    if ($image['size'] == "singlepic")
    $html = "<img src='{$image['url']}' alt='$alttext' class='$class' />";

    This is found in around line 37 in file admin/wp25/media-upload.php. It would also be nice to have the default class for "singlepic" be configurable from the Options page.

  2. Alex Rabe
    Member
    Posted 5 years ago #

    is the option "full" not doing the same ?

    if ($image['size'] == "full")
    $html = "<img src='{$image['url']}' alt='$alttext' class='$class' />";
  3. tnolte
    Member
    Posted 5 years ago #

    No actually "full" is not doing the exact same thing. You have coded:

    if ($image['size'] == "full")
    $html = "<img src='{$image['url']}' alt='$alttext' class='$class' />";
    $html = "<a $thumbcode href='{$image['url']}' title='$clean_description'>$html</a>";

    So basically you are adding a link/zoom box to the image as well. I guess in my mind then you really should move the <a> tags above the "full" if and only have it applied to the "thumbnail" size, perhaps that's what you intended?

  4. Alex Rabe
    Member
    Posted 5 years ago #

    Yes you are right...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.