Favicons and SimplePie 1.1.3

17 views
Skip to first unread message

Saul

unread,
Dec 24, 2008, 12:36:35 PM12/24/08
to Feed on Feeds Hackers
Feed on Feeds (which is just perfect for me) was having some problems
parsing some of my feeds, so I did a drop-in update of SimplePie 1.1.3
just to see of that would help. To my delight, it was just a drop in
and it did help, parsing pretty much everything.

There is one small cosmetic problem, though. favicons have stopped
working, and Feed on Feeds just displays the generic icon for all
feeds. I'm not a php hacker - though I can read it fairly well - but I
can't see what has changed in terms of external interface.

If anyone else has found their way through this, or can give some
insight into SimplePie favicon handling, I'd appreciate it.

- Saul

Saul

unread,
Jan 3, 2009, 1:46:22 PM1/3/09
to Feed on Feeds Hackers
Answering my own question:

Changing the guts of favicon.php to:

if(file_exists("./cache/" . $_GET['i'] . ".spi"))
{
SimplePie_Misc::display_cached_file($_GET['i'], './cache/', 'spi',
'SimplePie_Cache', 'md5');
}
else
{
header("Location: image/feed-icon.png");
}

works.

In the previous code the file existence check would do an md5 hash on
$_GET['i']
to form the file name. But 'i' is already hashed, so it would never
find the file.
I don't know whether the last two parameters to the
display_cached_file
are necessary (they seem to be the defaults), but they work, so I'm
going with what works.

- Saul
Reply all
Reply to author
Forward
0 new messages