Resource icon

RSS Feed Importer 1.4

No permission to download

Mark

Administrator
Staff member
Mark submitted a new resource:

RSS Feed Importer - Show members RSS feeds on details page

Download the zip attached to this thread
Upload the zip via the plugins manager in your admin control panel

Now your members can post their RSS feed for syndication into their stats pages from the user control panel. Compatible with all valid RSS Feeds: Twitter, wordpress, vbulletin, drupal etc.

Languages
- English, German
Read more about this resource...
 

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
 

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)
 

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');
  }
}
 

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.
 

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.
 

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.
 

Mark

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

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)
 

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.
 

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.
 

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.
 

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