Posted by drasgardian on November 17, 2010 at 10:08pm
1 follower
| Project: | Flickr |
| Version: | 6.x-1.x-dev |
| Component: | flickr (main module) |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I'd like to have some control of the display size of an image, even if the actual size is restricted to the few options available from flickr's api.
The attached patch will change flickr.inc so that it won't override the img tag's width and height parameters with the selected flickr api size.
Then with something like this in the template.php you can have more control over the display sizes:
function themename_flickr_photo($p, $size = NULL, $format = NULL, $attribs = NULL) {
$attribs = array('width' => '180px', 'height' => '180px'); /* CONTROL DISPLAY SIZES HERE */
$img = flickr_img($p, $size, $attribs);
$photo_url = flickr_photo_page_url($p['owner'], $p['id']);
$title = is_array($p['title']) ? $p['title']['_content'] : $p['title'];
return l($img, $photo_url, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE));
}| Attachment | Size |
|---|---|
| flickr.inc_.patch | 728 bytes |