View Full Version : RSSfeeds v1.2 by FASherman
descds
10-24-2005, 11:18 AM
Im loving this plugin and after modifying the code a little to use
</p> to get the format just right for my rss feeds it works perfectly ...
My only question is is there a way to modify the code to get it to parse ALL itmes in an RSS feed instead of stating a number of itmes to display ?
Im trying to use yahoos latest DVD releases feed http://rss.movies.yahoo.com/dvd/newthisweek.xml but the item numbers change weekly and if i put in too high a number on the plugin and the items don't exist i get a
Fatal error: Call to undefined function: array() in /home/descds/public_html/plugins/p78_RSSfeeds/p78_RSSfeeds.php on line 51
Is there anyway to modify this to pull all the data from an available rss feed ?
descds
10-24-2005, 11:40 AM
Mmm on further tests it would appear the plugin has an issue with this feed when it addresses the TTL on that line. I have no idea why as its a valid feed and ive even put back the changes i have made ..
Anyone any ideas ?
<div class='quotetop'>QUOTE(descds @ Oct 24 2005, 12:32 PM) 1845</div>
Mmm on further tests it would appear the plugin has an issue with this feed when it addresses the TTL on that line. I have no idea why as its a valid feed and ive even put back the changes i have made ..
Anyone any ideas ?
[/b]
AHA it appears the yahoo feed in question has a ttl of this feed is hard set in the xml of a value of 720 and my update was for 60. When it tries to update i assume the feed passes the 720 to the TTL time and is supposed to then set the plugin to 720 instead of 60 with this statement :-
if ($URLOPTION['feedTTL'] < $CHANNEL['TTL']) {
$URLOPTION['feedTTL'] = $CHANNEL('TTL');
}
but something isn't right and it errors with the above statement.
prmdbr
10-25-2005, 11:58 AM
<div class='quotetop'>QUOTE(descds @ Oct 24 2005, 07:40 AM) 1845</div>
Mmm on further tests it would appear the plugin has an issue with this feed when it addresses the TTL on that line. I have no idea why as its a valid feed and ive even put back the changes i have made ..
Anyone any ideas ?
AHA it appears the yahoo feed in question has a ttl of this feed is hard set in the xml of a value of 720 and my update was for 60. When it tries to update i assume the feed passes the 720 to the TTL time and is supposed to then set the plugin to 720 instead of 60 with this statement :-
if ($URLOPTION['feedTTL'] < $CHANNEL['TTL']) {
$URLOPTION['feedTTL'] = $CHANNEL('TTL');
}
but something isn't right and it errors with the above statement.
[/b]
This plug in is poorly supported. There has been a question about the exception: "Could not open RSS source" floating for three months and author still has not answered it.
I am suffering from the issue and would very much like some insight.
Terminator1138
10-25-2005, 06:06 PM
I have not seen FASherman around for a bit so I"m not sure what to say about your question. Perhaps someone here can help edit or customize the code to get it to what you need.
abcohen
10-25-2005, 06:15 PM
i dont have a clue about RSS -- sorry cant help out on this one.
descds
10-27-2005, 06:11 PM
<div class='quotetop'>QUOTE(descds @ Oct 24 2005, 12:40 PM) 1845</div>
Mmm on further tests it would appear the plugin has an issue with this feed when it addresses the TTL on that line. I have no idea why as its a valid feed and ive even put back the changes i have made ..
Anyone any ideas ?
AHA it appears the yahoo feed in question has a ttl of this feed is hard set in the xml of a value of 720 and my update was for 60. When it tries to update i assume the feed passes the 720 to the TTL time and is supposed to then set the plugin to 720 instead of 60 with this statement :-
if ($URLOPTION['feedTTL'] < $CHANNEL['TTL']) {
$URLOPTION['feedTTL'] = $CHANNEL('TTL');
}
but something isn't right and it errors with the above statement.
[/b]
OK i managed a workaround for it.
In your RSS XML look for a TTL statement. In Yahoo it was something like :-
<ttl>720</ttl>
Then set your Time to Live: option to that setting (in this case 720) and the exception above never comes about.
Ive got the plugin doing all i want now and although it didn't parse the yahoo feed properly i fixed that quite easily with a few str_replace variables ...
$DESCRIPTION[$i] = str_replace("< ", "<", $DESCRIPTION[$i]);
$LINK[$i] = str_replace(" ", "", $LINK[$i]);
This sorted the yahoo feed out nicely that was poorly parsed before hand.
Also changing the final output to a paragraph made it neater on appearance (in my mind). What i did was change this (from line 128)
echo '<a title="Published: '.$PUBDATE[$i].'" href="'.$LINK[$i].'" target="'.$OPTIONS['Target'].'">'.$TITLEFONT.$TITL E[$i].$TITLEFONTCLOSE.'</a>'.$RETURN;
if ($OPTIONS['Item Description']) {
echo $ITEMFONT.$DESCRIPTION[$i].$ITEMFONTCLOSE.$RET URN;
to this
echo '<b><a title="Published: '.$PUBDATE[$i].'" href="'.$LINK[$i].'" target="'.$OPTIONS['Target'].'">'.$TITLEFONT.$TITL E[$i].$TITLEFONTCLOSE.'</a></b>'.$RETURN;
if ($OPTIONS['Item Description']) {
echo $ITEMFONT.'<p>'.$DESCRIPTION[$i].$ITEMFONTCLOSE.$R ETURN.'</p>';
You can see the plugin working with a better format over at http://www.talkdvd.net/index.php?categoryid=11
If you using Yahoo feeds i suggest you adding the following just before line 128 to sort the feed properly or your links and html won't display as they should ..
$DESCRIPTION[$i] = str_replace("< ", "<", $DESCRIPTION[$i]);
$LINK[$i] = str_replace(" ", "", $LINK[$i]);
Also to make sure it parsed ALL of the yahoo feed (its a lot of XML on this one) i set the Number of articles to display: to 400 which is far more than within the RSS stream. It seems to handle it just right ...
I hope that helps someone ....
abcohen
10-16-2006, 02:33 PM
add those two lines does fix the extra space issues with this plugin.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.