I would like to get rid of the two links: "Edit Images" and "View the Image Gallery" that appears in the node type, usernode, for which I allow uploads.

I have looked through the module and read up a little bit about the drupal hook_link function.
Could I just delete all of this:

/**
 * Implementation of hook_link().
 */
function node_images_link($type, $node = null, $teaser = false) {
  $links = array();

  if ($type == 'node' && $node->nid && variable_get('node_images_position_'.$node->type, 'hide') != 'hide') {
    if (node_access('update', $node) && user_access('create node images')) {
      $links['node_images_edit'] = array(
        'title' => t('Edit images'),
        'href' => "node/$node->nid/images",
      );
    }
    if (count($node->node_images) && variable_get('node_images_gallery_link_'.$node->type, TRUE)) {
      $links['node_images_gallery'] = array(
        'title' => t('Open the image gallery'),
        'href' => "node/$node->nid/image_gallery",
      );
    }
  }

  return $links;
}

would this affect the working of the module?

Thanks in advance for your assistance.

Comments

stefano73’s picture

Status: Active » Fixed

Each link has a specific CSS class, so you can just set that class to display:none and the link will disappear. For example, if you want to hide the above links just add the following classes to your theme's style.css:

.links li.node_images_edit, .links li.node_images_gallery {
  display: none;
}
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.