function _node_gallery_image_view in Node Gallery 6.3
Same name and namespace in other branches
- 6.2 node_gallery.module \_node_gallery_image_view()
Attaches the image navigator to the image node's content.
Parameters
object $node: A reference to the image node object.
$teaser: A parameter corresponding to the $a3 parameter in hook_nodeapi().
$page: A parameter corresponding to the $a4 parameter in hook_nodeapi().
1 call to _node_gallery_image_view()
- node_gallery_nodeapi in ./
node_gallery.module - Implements hook_nodeapi().
File
- ./
node_gallery.module, line 756 - Node gallery module file.
Code
function _node_gallery_image_view(&$node, $teaser = NULL, $page = NULL) {
$relationship = node_gallery_get_relationship(NULL, $node->type);
$config = $relationship['settings'];
if (!$teaser) {
drupal_add_js(drupal_get_path('module', 'node_gallery') . '/js/ng_keyboard_shortcuts.js');
$gallery_node = node_load($node->gid);
node_gallery_set_breadcrumb(array(
'galleries',
'galleries/' . $node->uid,
'node/' . $gallery_node->nid,
), $node);
if ($config['display_navigator']) {
$cck_weight = content_extra_field_weight($node->type, 'image_navigator');
$weight = is_numeric($cck_weight) ? $cck_weight : -10;
$node->content['image_navigator'] = array(
'#value' => theme('node_gallery_image_navigator', node_gallery_get_image_navigator($node->gid, $node->nid), $node),
'#weight' => $weight,
);
}
}
}