You are here

function node_gallery_get_cover_nid in Node Gallery 6.3

Given a gallery, returns it's cover image.

Parameters

object $gallery: A populated node object.

Return value

The nid of the cover image.

1 call to node_gallery_get_cover_nid()
node_gallery_nodeapi in ./node_gallery.module
Implements hook_nodeapi().

File

./node_gallery.inc, line 507
Shared functions for node_gallery

Code

function node_gallery_get_cover_nid($gallery) {
  $cover_nid = db_result(db_query("SELECT cover_image FROM {node_gallery_galleries} WHERE gid = %d", $gallery->nid));
  return $cover_nid;
}