RSS Feed Importer 1.3.3

Show members RSS feeds on details page

  1. Mark
    • Staff

    Mark Administrator Staff Member

    Mark submitted a new resource:

    RSS Feed Importer - Show members RSS feeds on details page

    Read more about this resource...
  2. Mark
    • Staff

    Mark Administrator Staff Member

  3. Mark
    • Staff

    Mark Administrator Staff Member

  4. ashmetry

    ashmetry New Member

    Adding error (warning) if the url is not a valid RSS feed url would be good.
  5. Basti
    • Staff

    Basti Administrator Staff Member

    Validating if its url is a good point and will be added, ty.

    Though validating if its an actual feed is not feasable. As the feed could be xml, php or whatever extension basicly
  6. blacklevel

    blacklevel New Member

    Hi,

    how to limit results quantity?
    Will be beter, if there will be some limits.. for example 10 results only (not all existing)
  7. Mark
    • Staff

    Mark Administrator Staff Member

    At the moment you would need to modify the plugin for this (or you could do it with javascript in your theme). In the future we will add a setting to the admin for this.

    I didn't have time to test this, but it should get you started:

    edit plugins/RssImporter/details_compile_details.php

    Code:
      foreach ($rss->items as $item) {
    
    
         $TMPL['rss_link'] = strip_tags($item['link']);
         $TMPL['rss_title'] = strip_tags($item['title']);
         $TMPL['rss_desc'] = strip_tags($item['description']);
         $TMPL['rss_pubDate'] = date("l jS \of F Y h:i:s A",$item['date_timestamp']);
         
       $TMPL['rss_content'] .= $this->do_plugin_skin('./plugins/RssImporter','rssitems');
    
       }
    
    replace with:
    Code:
    
    $rss_limit = 5;//This number is how many items to show
    
    foreach ($rss->items as $item) {
     $rsscount++;
    
     if($rsscount < $rss_limit){
    
         $TMPL['rss_link'] = strip_tags($item['link']);
         $TMPL['rss_title'] = strip_tags($item['title']);
         $TMPL['rss_desc'] = strip_tags($item['description']);
         $TMPL['rss_pubDate'] = date("l jS \of F Y h:i:s A",$item['date_timestamp']);
         
       $TMPL['rss_content'] .= $this->do_plugin_skin('./plugins/RssImporter','rssitems');
      }
    }
    
    Basti likes this.
  8. Mark
    • Staff

    Mark Administrator Staff Member

  9. kapearl

    kapearl Member

    With the new update, is this supposed to redirect all the individual feed title links to the members homepage vs. the actual feed URL? It changes the links instead of just counting them. Is that correct?

    I just want to make sure I have it working properly. I don't think that's much of an issue unless a member wanted to use a Twitter feed or something offsite as their feed since everything gets redirected to their homepage instead of the feed link.
  10. Mark
    • Staff

    Mark Administrator Staff Member

    there is no redirect, it simply invokes a javascript out() function when the out link is clicked.

    This will be applied dynamically to all existing feed links. So any clicks out to any feed items will count as a click out in the stats.
  11. kapearl

    kapearl Member

    Hmm. Then somethings wrong on my end. I'll try re-installing the plugin again. It redirects each individual feed item back to the members homepage so far.
  12. kapearl

    kapearl Member

    I just uploaded a fresh download of the plugin and I get the same thing. Feed item --> Registered URL.
  13. Mark
    • Staff

    Mark Administrator Staff Member

    investigating now :)
  14. Mark
    • Staff

    Mark Administrator Staff Member

    My bad, I need to write another javascript out function for this too work. I'll post an update asap.
  15. Mark
    • Staff

    Mark Administrator Staff Member

  16. kapearl

    kapearl Member

    I'm getting a ton of errors in my daily error log like this (I'm assuming it's the RSS plugin)

    Code:
    PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent (output started at /home/public_html/magpierss/rss_fetch.inc:238) in /home/public_html/sources/misc/skin.php(364) : eval()'d code on line 120
    
    PHP Warning:  MagpieRSS: Failed to parse RSS file. (Undeclared entity error at line 26, column 152) in /home/public_html/magpierss/rss_fetch.inc on line 238
    I really don't see any issues with the rss feeds on the front end but my error log fills up really fast! I updated the plugin (to 1.3.3 even though it still says 1.3.1)
  17. Mark
    • Staff

    Mark Administrator Staff Member

    On the bright side, that is just a warning :)

    I believe it means one of your members has some problem with their feed OR the magpie code has an issue with your PHP version, did you upgrade PHP recently and then this started?

    You might check with your host and see if you can disable writing "warnings and notices" to the error_log. If you limit the log to errors only it will make a big difference. I will see if I can reproduce this and see if an update to Magpie is in order to work with newer PHP verisons.
  18. kapearl

    kapearl Member

    Thanks Mark! It was happening before the PHP upgrade. On occasion there is member usernames included in the error so I've been following up with members individually seeing if we can debug their RSS links. Members love the RSS inclusion so its worth it but I keep just dumping the the error file.
  19. Mark
    • Staff

    Mark Administrator Staff Member

    thanks for the feedback about the PHP version. If you are unable to avoid writing warnings to your error log you can also create a script to automatically empty the error_log with a cron job.

    example:

    clearlog.php
    PHP:
    if($_GET['somevar'] == '123123123123'){
    $fh fopen('error_log','w');
    fclose($fh);
    }
    then create a cron to run this URL:
    clearlog.php?somevar=123123123123

    can be set to run every x days, or hours etc. or you can manually visit clearlog.php?somevar=123123123123 and it will auto empty the log for you.

    Not the best option, but maybe useful.
  20. erkut79
    • Licensed

    erkut79 New Member

    Warning: Invalid argument supplied for foreach() in /home/bestadult/public_html/sources/details.php(93) : eval()'d code on line 15

    what is this error :S
    this only in details page some have rss url.
    not other sites details page.

Share This Page