/[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.4, Tue Feb 17 16:47:24 2009 UTC revision 1.42.2.5, Mon Mar 16 17:34:49 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flickr.module,v 1.42.2.3 2009/02/08 20:05:41 paulbooker Exp $  // $Id: flickr.module,v 1.42.2.4 2009/02/17 16:47:24 paulbooker Exp $
3    
4  require_once(drupal_get_path('module', 'flickr') .'/flickr.inc');  require_once(drupal_get_path('module', 'flickr') .'/flickr.inc');
5    
# Line 234  function theme_flickr_photos($uid, $phot Line 234  function theme_flickr_photos($uid, $phot
234  }  }
235    
236  function theme_flickr_photoset($ps, $owner, $size, $attribs = NULL) {  function theme_flickr_photoset($ps, $owner, $size, $attribs = NULL) {
237    $img = flickr_img($ps, $size, $attribs);    if (module_exists(flickr_sets)) {
238    $output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20));          $output .= "<div class='flickr-photoset'>\n";
239    $photo_url = flickr_photoset_page_url($owner, $ps['id']);          $photos = flickr_set_load($ps['id']);
240    $output .= "<div class='flickr-photoset'>\n";          foreach ((array) $photos['photoset']['photo'] as $photo) {
241    $title = is_array($ps['title']) ? $ps['title']['_content'] : $ps['title'];            //insert owner into $photo because theme_flickr_photo needs it
242    return l($img, $photo_url, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE));            $photo['owner'] = $owner;
243              $output .= theme('flickr_photo', $photo, $size);
244            }
245        $output .= '</div>';
246            return $output;
247      } else {
248        $img = flickr_img($ps, $size, $attribs);
249        $output = theme('pager', NULL, variable_get('flickr_photos_per_page', 20));
250        $photo_url = flickr_photoset_page_url($owner, $ps['id']);
251        $output .= "<div class='flickr-photoset'>\n";
252        $title = is_array($ps['title']) ? $ps['title']['_content'] : $ps['title'];
253        return l($img, $photo_url, array('attributes' => array('title' => $title), 'absolute' => TRUE, 'html' => TRUE));
254      }
255  }  }
256    
257  function flickr_page_title($user) {  function flickr_page_title($user) {

Legend:
Removed from v.1.42.2.4  
changed lines
  Added in v.1.42.2.5

  ViewVC Help
Powered by ViewVC 1.1.2