function filebrowser_node_view in Filebrowser 7.3
Same name and namespace in other branches
- 8.2 filebrowser.module \filebrowser_node_view()
- 8 filebrowser.module \filebrowser_node_view()
- 7.4 filebrowser.module \filebrowser_node_view()
- 7.2 filebrowser.module \filebrowser_node_view()
- 3.x filebrowser.module \filebrowser_node_view()
Implements hook_node_view().
File
- ./
filebrowser.module, line 534
Code
function filebrowser_node_view($node, $view_mode) {
//debugPrintCallingFunction();
if ($node->type == 'dir_listing' && $view_mode == 'full') {
// debug($node-> file_listing, 'node-> file_listing');
$links = array();
if (_filebrowser_metadata_access($node->file_listing['.']['fid'])) {
$links['file_browser_metadata'] = array(
'href' => "filebrowser/metadata/{$node->file_listing['.']['fid']}",
'title' => t("Edit Metadatas"),
'query' => drupal_get_destination(),
);
}
$thumbnailers = module_implements("filebrowser_thumbnailer_prepare");
if (count($thumbnailers) != 0) {
$links['file_browser_update_thumbnails'] = array(
'href' => "filebrowser/thumbnails/{$node->file_listing['.']['fid']}",
'title' => t("Update thumbnails"),
'query' => drupal_get_destination(),
);
}
$node->content['links']['filebrowser'] = array(
'#theme' => 'links',
'#links' => $links,
);
}
}