You are here

function theme_flickrfield_photoset_primaryphoto in Flickr 6

Same name and namespace in other branches
  1. 7 field/flickrfield.module \theme_flickrfield_photoset_primaryphoto()

Theme function for showing a primary photo of a photo set with optional link. Also includes a link to Flickr.com photo set page to comply with terms of service.

Parameters

$img HTML code for image:

$link link to which the image should link to:

$set_url url of the photo set on Flickr.com:

$size the flickr size of the image:

$title title to use for the link:

Return value

unknown_type

1 theme call to theme_flickrfield_photoset_primaryphoto()
theme_flickrfield_formatter_photoset_primaryphoto in field/flickrfield.module
Theme a Flickr photo set as the primary photo of that set.

File

field/flickrfield.module, line 611
Defines a Flickr field type.

Code

function theme_flickrfield_photoset_primaryphoto($img, $link, $set_url, $size, $title) {
  if ($link) {
    $output = '<div class="flickr-photoset-img">' . l($img, $link, array(
      'attributes' => array(
        'title' => $title,
      ),
      'html' => TRUE,
    )) . '</div>';
  }
  else {
    $output = '<div class="flickr-photoset-img">' . $img . '</div>';
  }
  $output .= '<div class="flickr-citation">' . l(t('Source: Flickr'), $set_url) . '</div>';
  return $output;
}