Download & Extend

Add a new image link (image_gallery.module)

Project:Helpers
Version:master
Component:Documentation
Category:task
Priority:minor
Assigned:budhan
Status:closed (won't fix)

Issue Summary

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.

Comments

#1

Project:Image» Helpers
Version:5.x-1.4» master
Component:image_gallery» Documentation
Category:feature request» task
Priority:normal» minor
Assigned to:Anonymous» budhan
AttachmentSize
unarchive_f2.png 1.49 KB

#2

Status:active» postponed (maintainer needs more info)

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

#3

Status:postponed (maintainer needs more info)» closed (won't fix)

No response.