function node_gallery_handler_field_gid::render in Node Gallery 6.2
File
- includes/
node_gallery_handler_field_gid.inc, line 68 - node_gallery_handler_field_gid.inc
Class
Code
function render($value) {
$config = node_gallery_get_config($this->options['node_gallery_setting']);
// if nga is there, and our gallery is password protected, show our protected image
if (module_exists('node_gallery_access')) {
if ($value->access_type == NODE_GALLERY_ACCESS_TYPE_PASSWORD) {
if (!node_gallery_access_check_access($value, 'gallery')) {
$value->filepath = node_gallery_access_default_pass_image();
}
}
}
$image = theme('image_view', $config['image_size']['thumbnail'], $value);
if ($this->options['link_to_node']) {
return l($image, 'node/' . $value->{$this->field_alias}, array(
'html' => TRUE,
));
}
return $image;
}