Forum

Displaying RSS Feed Title

2010-09-07 09:49:59

thatguy142

Hello, I was playing around with rsslib and by mistake, I removed the RSS Feed title from the display. Can someone help me get it back? Thank you!
2010-09-09 08:46:36

thatguy142

Just to clarify, I'm just talking about the title of the entire RSS feed, not the title of each individual article. Any help would be appreciated. Thank you!
2010-09-09 13:22:10

scriptol

Hello It is not clear of what you are talking. What is lost exactly?
2010-09-09 14:53:35

thatguy142

I was trying to customize the way the feed was formatted in the rsslib.php file and somewhere in the RSS_Display() function, I removed something that eliminated the title of the RSS feed. So, for example:
NEW YORK TIMES TOP STORIES [url]Article 1[/url] [url]Article 2[/url] [url]Article 3[/url]
Now looks like this:
[url]Article 1[/url] [url]Article 2[/url] [url]Article 3[/url]
without the title. Does this help explain? Thanks.
2010-09-10 11:36:02

scriptol

Ok, I have understood. The title is the first item in the list. And the list is limited by this statement:
$recents = array_slice($RSS_Content, $site, $size + 1 - $site);
in RSS_Display. Then, is $site = 0, the title is included, but if it is > 0, it is skipped.
2010-09-13 13:22:48

thatguy142

Thanks for the reply. I understand now that the feed title is the first item in the array. What I'm trying to do is make that title not part of the bulleted list so that I can format it differently. Is there a way to not include the first item in the array as part of the list? Thanks.
2010-09-14 11:23:29

scriptol

In RSS_Display... After:
$recents = array_slice($RSS_Content, $site, $size + 1 - $site);
At this stage, the title is included in $recents if the value of $site is 0; Get the title...
$feedtitle=$array_shift($recents);
Do what you want with the title in the $feedtitle variable, and continue as usual...
2010-09-20 14:04:01

thatguy142

Thanks for your help! I'm all set!