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

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

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

revision 1.7, Tue Jun 6 11:37:42 2006 UTC revision 1.7.2.1, Sat Aug 5 05:53:51 2006 UTC
# Line 132  function theme_flickr_photoset($album, $ Line 132  function theme_flickr_photoset($album, $
132    $output .= "<div style='float: right;'><img src='".$thumbnail."' alt='".$album_title."' class='$class'></div>";    $output .= "<div style='float: right;'><img src='".$thumbnail."' alt='".$album_title."' class='$class'></div>";
133    
134    $output .= "<h2>".$album_title."</h2>";    $output .= "<h2>".$album_title."</h2>";
135    $output .= "<p>". format_plural($album['photos'], '1 photo', '%count photos') ." in this album (<a href='flickr/setimages/$album_id'>view locally</a> - <a href='$link_to_photoset_on_flickr'>view on Flickr</a>).</p>";    $output .= "<p>". format_plural($album['photos'], '1 photo', '%count photos') ." in this album (".l(t('view locally'), "flickr/setimages/$album_id")." - <a href='$link_to_photoset_on_flickr'>view on Flickr</a>).</p>";
136    $output .= "<p>$album_description</p><br clear='both' />";    $output .= "<p>$album_description</p><br clear='both' />";
137    
138    return $output;    return $output;
# Line 177  function flickr_get_cached_file_contents Line 177  function flickr_get_cached_file_contents
177        // do nothing. XXX: Add stats code here.        // do nothing. XXX: Add stats code here.
178      }      }
179    else {    else {
180      $f  = fopen($file,"r");                  if (function_exists('curl_init')) {
181      $f2 = fopen($cache_filename,"w+");                          $ch = curl_init();
182      while ($r = fread($f,8192))                          curl_setopt($ch, CURLOPT_URL, $file);
183        {                          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
184          fwrite($f2,$r);                          $file_contents = curl_exec($ch);
185        }                          curl_close($ch);
186      fclose($f2);                  }
187      fclose($f);                  else {
188                      $file_contents = file_get_contents($file);
189                    }
190    
191                    $fh = fopen($cache_filename, 'w+');
192                    fwrite($fh, $file_contents);
193                    fclose($fh);
194    }    }
195    return file_get_contents ($cache_filename); // Return the file contents from the cache    return file_get_contents ($cache_filename); // Return the file contents from the cache
196  }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.7.2.1

  ViewVC Help
Powered by ViewVC 1.1.2