Viewing 1 replies (of 1 total)
  • Thread Starter dmarius

    (@dmarius)

    Never mind. I had to modify the nggCreateGallery function from nggfunctions.php.

    The code:

    global $wpdb, $nggRewrite, $nggdb;
    $gPreview = $wpdb->get_results(‘SELECT previewpic FROM ‘.$wpdb->nggallery.’ WHERE gid=”‘.$galleryID.'”‘ );
    foreach ($gPreview as $pimageID)
    {
    $pimageID2 = $nggdb->find_image($pimageID->previewpic);
    $gallery->previewurl = $pimageID2->thumbURL;
    }

    Call in the template: $gallery->previewurl;

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: NextGEN Gallery] Get gallery preview picture in a gallery template’ is closed to new replies.