WordPress.org

Ready to get started?Download WordPress

Forums

WP RSS Multi Importer
WP RSS Importer can't get images that ends with a bit of extra code (15 posts)

  1. riversatile
    Member
    Posted 1 year ago #

    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/

  2. Allen
    Member
    Plugin Author

    Posted 1 year ago #

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

    http://www.wprssimporter.com/

  3. riversatile
    Member
    Posted 1 year ago #

    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/

  4. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    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.

    http://www.wprssimporter.com/

    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.

  5. riversatile
    Member
    Posted 1 year ago #

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

  6. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    Yes...I'm using the shortcode...here is my settings:

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

  7. riversatile
    Member
    Posted 1 year ago #

    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://...

  8. Allen
    Member
    Plugin Author

    Posted 1 year ago #

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

  9. riversatile
    Member
    Posted 1 year ago #

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

  10. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  11. Allen
    Member
    Plugin Author

    Posted 1 year ago #

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

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

  12. riversatile
    Member
    Posted 1 year ago #

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

    Perhaps this means I'm not in the case "$strmatch3" in the IF statement ?

  13. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  14. riversatile
    Member
    Posted 1 year ago #

    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...

  15. Allen
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic