Could be useful an "Add new image in this gallery" link in any gallery like in official forum module.

I've added this:

/* we are arround row 168 in image_gallery.module ad in v 1.4 release */
.....
  menu_set_location($breadcrumb);
  $content .= '<ul>';
  /* ADDED TO HAVE LINK TO ADD */
  if (user_access('create images')) {
    $content .= '<li>'. l(t('Add new image.'), "node/add/image/") .'</li>';
  }
  else if ($user->uid) {
    $content .= '<li>'. t('You are not allowed to post a new image.') .'</li>';
  }
  else {
    $content .= '<li>'. t('<a href="@login">Login</a> to post a new image.', array('@login' => url('user/login', drupal_get_destination()))) .'</li>';
  }
  $content .= '</ul>';
  /* END */

  $content .= theme('image_gallery', $galleries, $images); /* notice the .= */
....

This show "add new image" if user can add new image, login if anonymous and can't, or "you can't" if user logged but can't. This link point to a generic "add image node" page. I'd prefer a link witch select the exact gallery (discovered from the link).

To do this we can use:

$content .= '<li>'. l(t('Add new image.'), "node/add/image/$tid") .'</li>';

adding $tid to the url, but i can't make image.module recognize that information like forum do instead.

CommentFileSizeAuthor
#1 unarchive_f2.png1.49 KBbudhan

Comments

budhan’s picture

Project: Image » Helpers
Version: 5.x-1.4 » master
Component: image_gallery » Documentation
Assigned: Unassigned » budhan
Category: feature » task
Priority: Normal » Minor
StatusFileSize
new1.49 KB
nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

Is this in the right the right queue? I don't see how this is for Helpers.

nancydru’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

No response.