/[drupal]/contributions/modules/flickr/flickr.module
ViewVC logotype

Diff of /contributions/modules/flickr/flickr.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.42.2.2, Fri Jan 30 10:39:01 2009 UTC revision 1.42.2.3, Sun Feb 8 20:05:41 2009 UTC
# Line 1  Line 1 
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    
# Line 218  function theme_flickr_photo_box($p, $siz Line 218  function theme_flickr_photo_box($p, $siz
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    }    }
# Line 234  function theme_flickr_photos($uid, $phot Line 233  function theme_flickr_photos($uid, $phot
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) {

Legend:
Removed from v.1.42.2.2  
changed lines
  Added in v.1.42.2.3

  ViewVC Help
Powered by ViewVC 1.1.2