WordPress.org

Forums

[Plugin: flickrRSS] No images with 2.7 (11 posts)

  1. Stephen Yeargin
    Member
    Posted 6 years ago #

    I am unable to retrieve any images using the get_flickrRSS() function. I suspect it might be in the regular expression to parse out $imgurl because I can do a var_dump($rss) to see the raw feed. Has anyone else run into this?

    http://wordpress.org/extend/plugins/flickr-rss/

  2. Stephen Yeargin
    Member
    Posted 6 years ago #

    Here is a comparison of the two outputs. It looks like the contents of the the $items[$i]['description'] output from the MagpieRSS has changed to strip out all HTML tags.

    In 2.6

    [description] => <p><a href="http://www.flickr.com/people/stephenyeargin/">yearginsm</a> posted a photo:</p>
    
    <p><a href="http://www.flickr.com/photos/stephenyeargin/3137553548/" title="Getting Into the Holiday Spirits"><img src="http://farm4.static.flickr.com/3225/3137553548_e60aacabee_m.jpg" width="240" height="180" alt="Getting Into the Holiday Spirits" /></a></p>

    In 2.7

    [description] => pa href=http://www.flickr.com/people/stephenyeargin/yearginsm/a posted a photo:/p
    pa href=http://www.flickr.com/photos/stephenyeargin/3137553548/ title=Getting Into the Holiday Spiritsimg src=http://farm4.static.flickr.com/3225/3137553548_e60aacabee_m.jpg width=240 height=180 alt=Getting Into the Holiday Spirits //a/p
  3. aouni-tahech
    Member
    Posted 6 years ago #

    i tried the plugin, me too, flcikr images are not showing up on wordpress 2.7

  4. Stephen Yeargin
    Member
    Posted 6 years ago #

    I have turned in a bug to the developer. Let's see what happens.

    http://plugins.trac.wordpress.org/ticket/945

  5. Stephen Yeargin
    Member
    Posted 6 years ago #

    This isn't the prettiest fix, but it will get your photos to show up again. Step through the plug-in file until you find this line.

    Replace:

    if(preg_match('<img src="([^"]*)" [^/]*/>', $item['description'],$imgUrlMatches)) {

    With:

    // Hack to switch regular expression based on WordPress Version
           	 if (get_bloginfo('version')=='2.7') {
           	   $pattern = '/img src=(.*) width/';
           	 } else {
           	   $pattern = '<img src="([^"]*)" [^/]*/>';
           	 }
    
           	 if(preg_match($pattern, $item['description'],$imgUrlMatches)) {
  6. Faramarz
    Member
    Posted 6 years ago #

    I am ABLE to see my images using get_flickrRSS() function, but this function only works on my home page. If I click on any of my posts or pages the I see broken images, I can still see the image titles but not the images. Is there any fix for this?

    Thanks,
    Faramarz

  7. Faramarz
    Member
    Posted 6 years ago #

    Guys,
    I disabled the "Enable the image cache" check box and my problem is fixed. That means I'm using this plug-in with WordPress 2.7 without any problems.

    Thanks,
    Faramarz

  8. Stephen Yeargin
    Member
    Posted 6 years ago #

    This may end up being a hosting issue, as my test site on my Mac seems to work just fine with 2.7+flickrRSS. I am on Joyent's Shared Accelerator. I'll take a shot in the dark and say few other people on here use that service.

  9. sugardaddy
    Member
    Posted 6 years ago #

    Nothing of all these solutions worked for me... there's a real problem... I'm trying to display a pool of group.
    My wordpress 2.7 is hosted on a dedicated server.
    Thanks for your help

  10. Zoutesnor
    Member
    Posted 6 years ago #

    I couldn't get it to work in wordpress 2.7 either, after a lot of tests I found the fetch_rss returned a time-out error with this plugin. I've got it working again by replacing wp-includes/rss.php with an older version (wp2.6) of this file, and now it works. Still trying to figure out a nicer fix for this.

  11. saturnino
    Member
    Posted 5 years ago #

    Hi
    this worked for me in wordpress 2.8.5

    // Hack to switch regular expression for 2.8.5
    				$pattern = '/img src=(.*)/';
    
    				if(!preg_match($pattern, $item['description'], $imgUrlMatches)) {
    
    					continue;
    				}
    
    				$url_array = explode(' ',$imgUrlMatches[1]);
    				$baseurl = str_replace("_m.jpg", "", $url_array[0]);

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags