How about removing the "Posted by" setting and turning this over to the theme settings? This not only reduces the settings, but allows other modules (e.g. Submitted By) to control the display in a way that the admin has more control over.

function theme_image_gallery_img($image, $size) {
  $width = $size['width'];
  // We'll add height to keep thumbnails lined up.
  $height = $size['height'] + 75;

  $content = '<li';
  if ($image->sticky) {
    $content .= ' class="sticky"';
  }
  $content .= " style='height : {$height}px; width : {$width}px;'>\n";
  $content .= l(image_display($image, IMAGE_THUMBNAIL), 'node/'. $image->nid, array('html' => TRUE));
  $content .= '<h3>'. l($image->title, 'node/'. $image->nid) .'</h3>';
//  if (variable_get('image_gallery_node_info', 0)) {
//    $content .= '<div class="author">'. t('Posted by: !name', array('!name' => theme('username', $image))) ."</div>\n";
    if (theme_get_setting('toggle_node_info_'. $image->type)) {
      $content .= '<div class="author">'. theme('node_submitted', $image) ."</div>\n";
    }
//    if ($image->created > 0) {
//      $content .= '<div class="date">'. format_date($image->created) ."</div>\n";
//    }
//  }
  $content .= "</li>\n";

  return $content;
}
CommentFileSizeAuthor
image_gallery1.patch956 bytesnancydru

Comments

nancydru’s picture

Status: Active » Needs review
joachim’s picture

Status: Needs review » Closed (duplicate)

I want to move galleries over to being made with views. This will give much more control over how they are generated and themed.
See http://drupal.org/node/405456 for a patch. Help testing this would be welcome if you are able.

nancydru’s picture

I'm still having a lot of trouble even getting this module to work.

joachim’s picture

What are you having problems with?

nancydru’s picture

Oops, I'm sorry I got that confused with Node Gallery, which I am having trouble with.

Now, that I am half way awake, let me explain something here. I have two sites where I do use Image Gallery. Neither has Views because there is no need for it. One of them is a very simple nearly brochure-ware type site; Views would double the size of the site. I understand why you might want to use Views, but please reconsider making it mandatory. I have another site that uses AcidFree, which does use Views, and I'm not sure it will ever get completely straightened out. I was considering converting it back to using IG.

Leeteq’s picture

#5: Second that. Nice with views support, but should not be made mandatory.

Leeteq’s picture

Version: 6.x-1.0-alpha4 » 6.x-1.x-dev