Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm not sure whether I'm using the module correctly, but when I request a photoset, either as a node or using 'views' / field, it just returns one lump of tags. No titles are displayed.
So I've done a temporary hack to the main module file:
function theme_flickr_photoset($ps, $owner, $size, $attribs = NULL) {
if (module_exists('flickr_sets')) {
$output .= "<div class='flickr-photoset'>\n";
$photos = flickr_set_load($ps['id']);
foreach ((array) $photos['photoset']['photo'] as $photo) {
//insert owner into $photo because theme_flickr_photo needs it
$photo['owner'] = $owner;
$output .= "<div class='flickr-photoset-frame'>\n";
$output .= "<div class='flickr-photoset-photo'>\n";
$output .= theme('flickr_photo', $photo, $size) . "\n";
$output .= "</div>\n";
$output .= "<div class='flickr-photoset-title'>\n";
$output .= $photo['title'];
$output .= "</div>\n";
$output .= "</div>\n";
}
$output .= '</div>';
return $output;
} else {
$img = flickr_img($ps, $size, $attribs);
$output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20));
$photo_url = flickr_photoset_page_url($owner, $ps['id']);
$output .= "<div class='flickr-photoset'>\n";
$title = is_array($ps['title']) ? $ps['title']['_content'] : $ps['title'];
return l($img, $photo_url, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE));
}
}
Which seems to work. Is there a better way of achieving the end result?
See http://www.gear7.co.uk/gallery for an example.
Comment | File | Size | Author |
---|---|---|---|
#4 | more_classes_to_target_with_css-925262-5.patch | 1.4 KB | lolandese |
Comments
Comment #1
lolandese CreditAttribution: lolandese commentedSorry for the late reply.
In the latest D7 dev version of the module an image is structured as:
CSS takes care of the display. As you can see some new features are present as well, such as colorbox/lightbox and title captions.
Why is 'span' used instead of 'div'? See http://stackoverflow.com/a/1611172.
Would this have been sufficient for your use case? Feel free to re-open if not or if a backport to D6 is needed.
Thanks.
Comment #3
lolandese CreditAttribution: lolandese commentedNow that the caption can contain the title and extra info like date, location and author, we could provide classes at a more fine-grained level to target those.
Comment #4
lolandese CreditAttribution: lolandese commentedhttp://drupalcode.org/project/flickr.git/commitdiff/1df3ca6
Comment #5
lolandese CreditAttribution: lolandese commentedComment #7
lolandese CreditAttribution: lolandese commentedAdded some more extensive documentation at https://drupal.org/node/2170535#html.
Comment #8
lolandese CreditAttribution: lolandese commentedSee #2367755: D6 maintenance.
Comment #9
lolandese CreditAttribution: lolandese commentedSetting this back to D7 and being 'fixed (closed)'.
Main reason is the fact that links to this issue show the status on hover without revealing the version (6 or 7). This might give the impression that the mentioned issue will not be solved, while in fact it is already fixed for the D7 version. 'Fixed (closed)' reflects the current status correctly for D7. 'Closed (won't fix)' is only valid for the minimally maintained D6 version of the module.