| 1 |
<?php |
<?php |
| 2 |
// $Id: flickr.module,v 1.42.2.1 2009/01/13 21:12:12 paulbooker Exp $ |
// $Id: flickr.module,v 1.42.2.2 2009/01/30 10:39:01 paulbooker Exp $ |
| 3 |
|
|
| 4 |
require_once(drupal_get_path('module', 'flickr') .'/flickr.inc'); |
require_once(drupal_get_path('module', 'flickr') .'/flickr.inc'); |
| 5 |
|
|
| 218 |
$output .= '<div class="flickr-photo-title">'. check_plain($title) ."</div>\n"; |
$output .= '<div class="flickr-photo-title">'. check_plain($title) ."</div>\n"; |
| 219 |
$output .= "</a>"; |
$output .= "</a>"; |
| 220 |
$output .= "</div>\n"; |
$output .= "</div>\n"; |
|
|
|
| 221 |
return $output; |
return $output; |
| 222 |
} |
} |
| 223 |
|
|
| 224 |
function theme_flickr_photos($uid, $photos) { |
function theme_flickr_photos($uid, $photos) { |
| 225 |
$output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20)); |
$output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20)); |
| 226 |
$output .= "<div class='fickr-photoset'>\n"; |
$output .= "<div class='flickr-photoset'>\n"; |
| 227 |
foreach ($photos['photo'] as $photo) { |
foreach ($photos['photo'] as $photo) { |
| 228 |
$output .= theme('flickr_photo_box', $photo, 'm'); |
$output .= theme('flickr_photo_box', $photo, 'm'); |
| 229 |
} |
} |
| 233 |
} |
} |
| 234 |
|
|
| 235 |
function theme_flickr_photoset($ps, $owner, $size, $attribs = NULL) { |
function theme_flickr_photoset($ps, $owner, $size, $attribs = NULL) { |
| 236 |
$output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20)); |
$img = flickr_img($ps, $size, $attribs); $output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20)); |
| 237 |
$output .= "<div class='flickr-photoset'>\n"; |
$photo_url = flickr_photoset_page_url($owner, $ps['id']); $output .= "<div class='flickr-photoset'>\n"; |
| 238 |
if (module_exists('flickr_sets')) { |
$title = is_array($ps['title']) ? $ps['title']['_content'] : $ps['title']; $photos = flickr_set_load($ps['id']); |
| 239 |
$photos = flickr_set_load($ps['id']); |
return l($img, $photo_url, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE)); |
|
foreach ((array) $photos['photoset']['photo'] as $photo) { |
|
|
//insert owner into $photo because theme_flickr_photo needs it |
|
|
$photo['owner'] = $owner; |
|
|
$output .= theme('flickr_photo', $photo, $size); |
|
|
} |
|
|
} |
|
|
$output .= '</div>'; |
|
|
$output .= theme('pager', NULL, variable_get('flickr_photos_per_page', 20)); |
|
|
return $output; |
|
| 240 |
} |
} |
| 241 |
|
|
| 242 |
function flickr_page_title($user) { |
function flickr_page_title($user) { |