Forums

[Plugin: NextGEN Gallery] API question - get image (7 posts)

  1. navyseal
    Member
    Posted 2 years ago #

    hi!
    i am currently modding my gallery template and therefore i need each preview pic of a gallery in a certain size (cropped). so far i could find out the image id over the nggdb object (nggdb::find_image($gallery->previewpic)) but i cant display it....
    is there a simple way to display the image?!

    ps: sorry for my bad english ;)

  2. Alex Rabe
    Member
    Posted 2 years ago #

    see nggSinglePicture() in nggfunctions.php

  3. navyseal
    Member
    Posted 2 years ago #

    ok this function works great, but is there a way to crop the resulting image with your lib?

  4. navyseal
    Member
    Posted 2 years ago #

    hi
    i found a way to generate the images with the specific size over the ngg_Thumbnail class - but i want to generate the images on the fly so i tried display the thumb with the show method ....
    <img class="cover" alt="<?php echo $gallery->title ?>" src="<?php $thumb->show(70) ?>" />

    instead of the image i only get some cryptic text output (�]����{�Q��}(a��l_r�@Q@ EPIKI@%���) :/ when i save the image into a file it works ...

    i hope someone could help me with that problem!

  5. ojobson
    Member
    Posted 2 years ago #

    Have you found a solution to this problem? I am looking to have a preview pic for my galleries too - I thought if I inserted the image ID of the preview image into custom fields on the post, then I could insert a string into the loop to echo the html to display the image next to the title

    Now I have a list of post titles, but no idea how to use nggsinglepicture() and the custom fields call to display the picture!

    Any help would be welcome.

  6. cruisetastic
    Member
    Posted 2 years ago #

    I too am looking for the same thing - a preview of the gallery (not album) that I can use for a thumbnail.

    HELP!

  7. ojobson
    Member
    Posted 2 years ago #

    I found this post which could be helpfull...

    ..but I have no idea what to do with the code - any ideas where I put it and how I call it? This has got me stumped...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.