Search the web
Sign In
New User? Sign Up
simplepie-support · SimplePie Support
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Can't get Author from RSS feed.   Message List  
Reply | Forward Message #4019 of 4578 |
Re: [SimplePie] Can't get Author from RSS feed.

Thanks. I figured it would be something simply like that. But now I've got a new
problem. Upon changing the code, I now get a blank name returned from the author
object:

"Posted on Thu Jun 25 23:36:15 2009 by "

I thought maybe getting the name was not necessary so I left it at just echoing
the author but that gave me what looked like a hash. Clearly that's not what I
wanted.

I assume that, as before, I am over looking something.

- Leeor

--- In simplepie-support@yahoogroups.com, Ryan Parman <simplepie.support@...>
wrote:
>
> Well, you're using $feed->get_author() in your code. Check for $item-
> >get_author() instead.
>
> --
> Ryan Parman
> <http://ryanparman.com>
>
> Please don't email/IM me directly. That's why we have a mailing list. ;)
>
>
>
>
>
>
> On Jun 26, 2009, at 11:18 PM, leeor_net wrote:
>
> > Probably should have specified that. Item level author.
> >
> > --- In simplepie-support@yahoogroups.com, Ryan Parman
> > <simplepie.support@> wrote:
> >>
> >> Are you trying to get the feed-level author or the item-level author?
> >>
> >> --
> >> Ryan Parman
> >> <http://ryanparman.com>
> >>
> >> Please don't email/IM me directly. That's why we have a mailing
> >> list. ;)
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Jun 26, 2009, at 5:52 PM, leeor_net wrote:
> >>
> >>> I've looked around on Google and searched through here but didn't
> >>> find anything that matched what I'm having trouble with.
> >>>
> >>> Very simply, I can't retrieve the Author from an RSS feed.
> >>>
> >>> In the feed, there is the author's tag: <author>leeor_net</author>
> >>>
> >>> As far as I understand it's correct seeing as other RSS aggregators
> >>> don't seem to have a problem with it.
> >>>
> >>> Basing off the sample code from
http://simplepie.org/wiki/reference/simplepie/get_author
> >>> , I have the following code in my php file:
> >>>
> >>> <?php
> >>> if($author = $feed->get_author())
> >>> {
> >>> echo $author->get_name();
> >>> }
> >>> else
> >>> {
> >>> echo "Unknown Author";
> >>> }
> >>> ?>
> >>>
> >>> only to find that it only ever shows "Unknown Author".
> >>>
> >>> Everything else appears to display correctly (title, permalink, post
> >>> date and content). Clearly I've missed something... any suggestions?
> >>>
> >>>
> >>>
> >>> ------------------------------------
> >>>
> >>> Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>





Wed Jul 1, 2009 7:32 am

leeor_net
Online Now Online Now
Send Email Send Email

Forward
Message #4019 of 4578 |
Expand Messages Author Sort by Date

I've looked around on Google and searched through here but didn't find anything that matched what I'm having trouble with. Very simply, I can't retrieve the...
leeor_net
Online Now Send Email
Jun 27, 2009
12:52 am

Are you trying to get the feed-level author or the item-level author? -- Ryan Parman <http://ryanparman.com> Please don't email/IM me directly. That's why we...
Ryan Parman
skyzyxufks
Offline Send Email
Jun 27, 2009
3:05 am

Probably should have specified that. Item level author....
leeor_net
Online Now Send Email
Jun 27, 2009
6:19 am

Well, you're using $feed->get_author() in your code. Check for $item- ... -- Ryan Parman <http://ryanparman.com> Please don't email/IM me directly. That's why...
Ryan Parman
skyzyxufks
Offline Send Email
Jun 27, 2009
3:24 pm

Thanks. I figured it would be something simply like that. But now I've got a new problem. Upon changing the code, I now get a blank name returned from the...
leeor_net
Online Now Send Email
Jul 1, 2009
7:33 am

Pulling the author name from RSS 2.0 is imperfect because the spec is terribly unclear in this area, so we do our best. There are a new sub- methods of...
Ryan Parman
skyzyxufks
Offline Send Email
Jul 4, 2009
6:45 am

Thanks for your reply. I'll see what I can manage. It's a shame that specifications aren't more clear but I figured the '<author>' item tag was fairly clear. ...
leeor_net
Online Now Send Email
Jul 6, 2009
11:49 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help