WordPress.org

Support

Support » Plugins and Hacks » WP RSS Importer can't get images that ends with a bit of extra code

WP RSS Importer can't get images that ends with a bit of extra code

  • Hi Allen,

    I have two categories, the first displays correctly images on the left and the description on the right. But on the other category, it seems images are not fetched correctly, the images don’t display. I saw that if I choose “give me everything” parameter, then the image are there ! But this cause a bad display on the first category (too long data).

    I already tested with “allow_url_fopen” to ON.

    I really understand your plugin and the code inside, but I’m not able to find out where to change something in the “preg_match” instruction to fix the issue and get the images correctly on the RSS Feed http://feeds.feedburner.com/surftagram

    A “preg_match” change is required in the file “excerpt_functions.php” for the images to be fetched correctly because of their specific name.
    For example : http://i0.wp.com/distilleryimage3.s3.amazonaws.com/5e4206e092ac11e2bbd422000a1f9ab2_7.jpg?resize=584%2C9999

    Here is the page where is the RSS Feed output :
    http://www.riversatile.fr/instagram/

    I noticed that if I change ftp to “0” at line 432 in “excerpt_functions.php”, images are showing !

    if($ftp==0){
    				$content = limitwords($maxchars,$content);
    			}else{
    				$content = limitwords($maxchars,strip_tags($content));
    			}

    Thanks for your support
    Riversatile.

    http://wordpress.org/extend/plugins/wp-rss-multi-importer/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Allen

    @amweiss98

    are you using the shortcode, if so, this is what I get:

    Katie Jaworski

    Yes I’m using the shortcode below :
    [wp_rss_multi_importer category="1" mytemplate="default.php" thisfeed="20" maxperpage="20" windowstyle="0"]
    I do not get the image.

    Using “dumpthis=1”, I got the images. So the issue doesn’t come from my website service provider.

    I made the update to the version 2.63 today, and now I get 10th post image only. The other 9 post have no image. I do not see anything wrong in the source code.

    It’s the same with :
    [wp_rss_multi_importer category="1"]

    See here : http://www.riversatile.fr/instagram/

    Plugin Author Allen

    @amweiss98

    well, as I said, I cannot reproduce this problem on my public server (hostgator), as you can see here using your shortcode and version 2.63.

    Katie Jaworski

    if you want, contact me at

    http://www.allenweiss.com/contact and give me temporary access to your server which is the only way I can possibly see what might be going on.

    Did you use the shortcode the first time here : http://www.wprssimporter.com/ ???
    And if yes, what options did you use ?

    Plugin Author Allen

    @amweiss98

    Yes…I’m using the shortcode…here is my settings:

    http://www.screencast.com/t/OUjfM1RyUvo

    Here is an image that is not displaying (9th post image) :

    <span>Posted: </span>Sat, 23 Mar 2013 09:55:07 +0000</h5>
    <div class="itemcontent" name="decodeable"><div><img src='http://i1.wp.com/distilleryimage1.s3.amazonaws.com/d9798020939e11e2bbaa22000a1fb198_7.jpg?resize=584%2C9999' style='max-width:600px;' />
    <div>Good fun but tiring surfing 3 heats at the #margiespro today!! Photo bomb @ryanbaut via <a href="http://instagram.com/p/XMhC28M3m5/">Instagram</a></div>
    </div>

    Here is the 10th image that is displaying :

    <span>Posted: </span>Sat, 23 Mar 2013 08:03:24 +0000</h5>
    <div class="itemcontent" name="decodeable"><div><img style="max-width: 600px;" src="http://i2.wp.com/distilleryimage6.s3.amazonaws.com/c9cd5788938e11e2a5d622000a1e94d6_7.jpg?resize=584%2C9999" alt="" /></p>
    <div>1ft to 10ft always some Roy at Bells! via <a href="http://instagram.com/p/XMT4ydN-gK/">Instagram</a></div>
    </div>

    It’s strange, on the image that is displaying, the TAG is starting with <img style="max-width: 600px;" src="http://..., the image that is not displaying starts directly with <div><img src='http://...
    All the image that are not displaying start with <div><img src='http://...

    Plugin Author Allen

    @amweiss98

    That shouldn’t make any difference since it’s just inline styling…what are the settings you have (are they different than mine)?

    Yes, settings were different, but I put the same settings as you, this changes nothing. I really don’t understand what’s the issue.

    Plugin Author Allen

    @amweiss98

    well, it’s clear the issue is that the images that are working have double quotes around the url while the ones that are not working have single quotes (they should have double quotes). I’m going to see if I can get this to work, but it may take awhile.

    Plugin Author Allen

    @amweiss98

    ok…go into excerpt_functions.php and replace $strmatch3 with this

    $strmatch3=’^(.*)(<img.*src=\’.*\’\s*?\/?>)\s*(.*)$’;

    Unfortunately, this doesn’t change anything.
    It’s strange.

    Perhaps this means I’m not in the case “$strmatch3” in the IF statement ?

    Plugin Author Allen

    @amweiss98

    well, sorry, then I’m at a loss…this seems like a unique case (I haven’t heard of others with this problem)..perhaps another plugin will handle your feed better than mine.

    But do the change :
    $strmatch2='^(.*)(<img.*src=\'.*\'\s*?\/?>)\s*(.*)$';
    solved the issue for the images that have single quote source image file.

    Now I’m trying to find a way to do the preg_match with the OR operator (” OR ‘)

    Do you know how to do that ? I know I have to use the pipe (|), but I don’t know how…

    Plugin Author Allen

    @amweiss98

    the or operator is typically [“|\’], but i’m not sure that will work.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘WP RSS Importer can't get images that ends with a bit of extra code’ is closed to new replies.