items, 0, $num_items); # builds html from array foreach ( $items as $item ) { if(preg_match('', $item['description'],$imgUrlMatches)) { $imgurl = $imgUrlMatches[1]; ## change image size if ($imagesize == "square") { $imgurl = str_replace("m.jpg", "s.jpg", $imgurl); } elseif ($imagesize == "thumbnail") { $imgurl = str_replace("m.jpg", "t.jpg", $imgurl); } elseif ($imagesize == "medium") { $imgurl = str_replace("_m.jpg", ".jpg", $imgurl); } #check if there is an image title (for html validation purposes) if($item['title'] !== "") $title = htmlspecialchars(stripslashes($item['title'])); else $title = "Flickr photo"; $url = $item['link']; preg_match('', $imgurl, $flickrSlugMatches); $flickrSlug = $flickrSlugMatches[1]; # cache images if ($useImageCache) { # check if file already exists in cache # if not, grab a copy of it if (!file_exists("$fullPath$flickrSlug.jpg")) { if ( function_exists('curl_init') ) { // check for CURL, if not use fopen $curl = curl_init(); $localimage = fopen("$fullPath$flickrSlug.jpg", "wb"); curl_setopt($curl, CURLOPT_URL, $imgurl); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1); curl_setopt($curl, CURLOPT_FILE, $localimage); curl_exec($curl); curl_close($curl); } else { $filedata = ""; $remoteimage = fopen($imgurl, 'rb'); if ($remoteimage) { while(!feof($remoteimage)) { $filedata.= fread($remoteimage,1024*8); } } fclose($remoteimage); $localimage = fopen("$fullPath$flickrSlug.jpg", 'wb'); fwrite($localimage,$filedata); fclose($localimage); } // end CURL check } // end file check # use cached image print $before_image . "\"$title\"" . $after_image; } else { # grab image direct from flickr print $before_image . "\"$title\"" . $after_image; } // end use imageCache } // end pregmatch } // end foreach echo '

powered by bbFlickr

'; } // end if($rss) } # end get_flickrRSS() function function flickrRSS_subpanel() { if (isset($_POST['save_flickrRSS_settings'])) { $option_flickrid = $_POST['flickr_id']; $option_tags = $_POST['tags']; $option_set = $_POST['set']; $option_display_type = $_POST['display_type']; $option_display_numitems = $_POST['display_numitems']; $option_display_imagesize = $_POST['display_imagesize']; $option_before = $_POST['before_image']; $option_after = $_POST['after_image']; $option_useimagecache = $_POST['use_image_cache']; $option_imagecacheuri = $_POST['image_cache_uri']; $option_imagecachedest = $_POST['image_cache_dest']; bb_update_option('flickrRSS_flickrid', $option_flickrid); bb_update_option('flickrRSS_tags', $option_tags); bb_update_option('flickrRSS_set', $option_set); bb_update_option('flickrRSS_display_type', $option_display_type); bb_update_option('flickrRSS_display_numitems', $option_display_numitems); bb_update_option('flickrRSS_display_imagesize', $option_display_imagesize); bb_update_option('flickrRSS_before', $option_before); bb_update_option('flickrRSS_after', $option_after); bb_update_option('flickrRSS_use_image_cache', $option_useimagecache); bb_update_option('flickrRSS_image_cache_uri', $option_imagecacheuri); bb_update_option('flickrRSS_image_cache_dest', $option_imagecachedest); ?>

flickrRSS settings saved

bbFlickr Settings

Option Setting
ID Number Use the idGettr to find your user or group id.

Display items using images

Set Use number from the set url

Tags Comma separated, no spaces

HTML Wrapper

Cache Settings

This allows you to store the images on your server and reduce the load on Flickr. Make sure the plugin works without the cache enabled first.

URL http://yoursite.com/cache/
Full Path /home/path/to/wp-content/flickrrss/cache/
/>

About

bbFlickr plugin is based on flickrRSS plugin for Wordpress, originaly created by Dave Kellam. Even so, if you like it and you understand it's not so easy even to modify someones code, you can donate some bucks :).

Type donation amount: $