Author Topic: Google Fix  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
Google Fix
« on: November 21, 2009, 04:47:21 AM »
Well Looks like google no longer displays the author on any type of feed (if you find a page showing the authors name Please tell me....

attachment fixes the description bug tho :)

Offline FireDart

  • Project Leader
  • Pro Member
  • *****
  • Posts: 406
  • Karma: 4
    • View Profile
    • FireDart
Re: Google Fix
« Reply #1 on: November 24, 2009, 06:04:38 PM »
Hey Jeff,
For the author name is there some way we can return an "else if" statement that says if the author title is not present(Which it is not) it out puts:

"[Unknown Author]"

Since if you leave a title blank it will say "Please Enter A Author" and you can't continue.

If this is possible can you explain how to do this for all the tags? Example:
"[Unknown Title]"
"[Unknown Author]"
"[Unknown Description]"


And if am right does it go something like this:
Code: [Select]
/**
 * Gets Author from youtube id
 *
 * @param Youtube Id
 * @return $yt_author
 */
function getauthor($videoid){
$yt_xml_author_string = @file_get_contents("http://gdata.youtube.com/feeds/api/videos?q=".$videoid);
$yt_xml_author_start = explode("<uri>http://gdata.youtube.com/feeds/api/users/",$yt_xml_author_string,2);
$yt_xml_author_end = explode("</uri></author>",$yt_xml_author_start[1],2);
$yt_author = addslashes($yt_xml_author_end[0]);
return $yt_author;
} else {
[Unknown Author]
}

-FD

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
Re: Google Fix
« Reply #2 on: November 24, 2009, 09:25:51 PM »
Ya there is a way for everything lol.... Ill try to figure it out a little later for us :P

Offline Jeff

  • Global Moderator
  • Sr phpd Member
  • *****
  • Posts: 359
  • Karma: 5
  • Need help? Feel free to ask.
    • View Profile
Re: Google Fix
« Reply #3 on: November 25, 2009, 01:06:32 PM »
this is harder than I thought for some odd reason :-P