Closed (duplicate)
Project:
Image
Version:
6.x-1.x-dev
Component:
image_gallery
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2009 at 19:13 UTC
Updated:
25 Nov 2010 at 19:40 UTC
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;
}
| Comment | File | Size | Author |
|---|---|---|---|
| image_gallery1.patch | 956 bytes | nancydru |
Comments
Comment #1
nancydruComment #2
joachim commentedI 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.
Comment #3
nancydruI'm still having a lot of trouble even getting this module to work.
Comment #4
joachim commentedWhat are you having problems with?
Comment #5
nancydruOops, 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.
Comment #6
Leeteq commented#5: Second that. Nice with views support, but should not be made mandatory.
Comment #7
Leeteq commented