bioneural.net site preferences

Accessibility

Toggle width/ text size:

style

Default/Alternate

Suits visual impairment, mobile devices

Styling

Change the theme:

layout

NB: may reduce functionality

Link behaviour

Links with an icon are off-site:

links

Right-click any link to optionally open in a new window or tab


34 responses to “Baking SimplePie with favicon topping”


  1. Comment 1 Ryan Parman

    Thanks so much for the write-up, Bruce! I'm curious about the feeds that were giving you a fatal error. I'd be happy to find out about feeds were giving you issues so that we can fix them.

    And what was the specific error, by the way?

  2. Comment 2 Bruce

    Thank you Ryan. There are a number of feeds I couldn't get to work; I'll open a thread on the Support Forum to list these, together with a note of the results.

  3. Comment 3 karl long

    Great job with the favicons. I think your overall design just keeps getting richer. I find as I add features my design starts to fall apart, and I have to start ratcheting back :-)

    Karl

  4. Comment 4 Bruce

    Karl, thanks. You've got quite a collection of favicons there in your sidebar! Is that a del.icio.us-supplied Javascript you're using to automatically fetch them? I read your comment about needing to hack the script to use a generic favicon when one can't be found; I'm hoping this will be addressed in a future version of SimplePie (as will favicon caching, something I guess your JavaScript doesn't do).

    I know exactly what you mean about ratching back on "features". WordPress and PHP are newish to me and I'm still in the "experimentation" phase. Too much JavaScript, too much CSS, way too many WP plugins—it's embarrassing—but it sure is a fun voyage of discovery!

  5. Comment 5 kristin

    Impressive! I'm going to have to try this out when I get a bit of time.

  6. Comment 6 Bruce

    You're obviosuly a favicon fan too Kristin! I think SimplePie would bake well with your favicon matrix actually; you could show the post title, author, date, or even description on mouseover for each favicon. I notice you're getting some of this some of the time e.g. Author (Last updated) but have no idea how you're doing that currently. Are you using some kind of feed parser already? Perhaps it functionality built into the WP links manager?

  7. Comment 7 Brett

    I also recieved fatal errors when adding a few sites into the array and also favicons do not appear like htey should. An example of the errors that I recieved was:

    Fatal error: Call to a member function get_name() on a non-object in /home/gatewayy/www/wp-content/themes/k2/baking.php on line 80

    I am also having issues with styling the links correctly but I will play with that I suppose. If you would like to take a peek at what I have so far take a peek at http://gatewayy.net/links/. Thank youvery much for the writ up it was easy to follow and I have been wanting to create something like thsi for quite some tiem. :)

  8. Comment 8 Bruce

    Brett, that favicon behaviour sure is odd. I'm thinking you might have a more general CSS problem behind this, however, as (for example) the icons at the bottom of the sidebar in your SimplePie post have also gone screwy. I get 34 XHTML validation errors on that page, and the CSS validator just chokes. I would suggest you get your XHTML and CSS valid, and then try debugging the links page if you still get that strange staggered display of your favicons.

    Yes, that fatal error is familiar and one I've reported in the Support Forum here together with a few feeds that gave me "issues". Perhaps you might add the feeds that give you trouble? I'm hoping the forthcoming beta 3 might resolve some, if not all, of the problems.

  9. Comment 9 Brett

    34 errors? Man I didn't know it was that bad, thanks for the heads up! BTW, how are you doing that human check?

  10. Comment 10 Bruce

    Well, I thought I'd best not mention the 74 on your Links page ;-)

    The "humanity checker" (I prefer that to "maths test") is courtesy of DYPM which I highly recommend.

  11. Comment 11 Brett

    Thanks again, you were using the W3C validator I suppose?

  12. Comment 12 Bruce

    Yes. I find the Safari Tidy plugin useful as an extra visual aid for spotting pages with errors.

  13. Comment 13 Jimmy

    Nice tutorial, this will come in handy when I start blogging.. soon hopefully.

  14. Comment 14 Bruce

    Thanks for the feedback Jimmy. Have you choosen a blogging platform? I switched to WordPress in March of this year and haven't looked back. I've really enjoyed learning the utility of PHP and have found the community generally responsive and welcoming to newcomers.

  15. Comment 15 hamza

    many thanx

    i test it with the wordpress and works fine..

    but now i use my code after i used Feedonfeed... moving to simplepie and find ur great How to.

    but i got this erorr when i tried to use it without wordpress......

    Notice: Undefined offset: 3 in c:\program files\easyphp1-8-2\www\medpeek\hits.php on line 32

    and repeat many times count to 9

    Notice: Undefined offset: 9 in c:\program files\easyphp1-8-2\www\medpeek\hits.php on line 32

    i didn`t get it when i used it with the wordpress

    ah that`s what present at the line 32
    $feed = new SimplePie($myfeeds[$i], $cache);

    ..i think it`s realted to the prev. line
    for ($i=0; $i

  16. Comment 16 Bruce

    hamza, I regret I'm not sure what might be causing your "Undefined offset" errors, but if you're not using the WordPress plugin, did you install SimplePie correctly and remember to uncomment the require simplepie.inc and set cache folder lines (at the beginning of the above script), specifiying the correct file/folder locations for your specific installation? You may also need to edit out some of the WordPress-specific PHP, like get_header();

    If this isn't the problem your best bet is to post a help request on the SimplePie Forum, where the experts can help you if you post the exact code you are using.

  17. Comment 17 hamza

    Hi Bruce..

    in wordpress it`s workin just fine ....... but alone not..

    am not usin wordpress for this one.

    and i did install the simplepie and define the cache folder.

    many thanx
    ...
    note i used a little XML parser i made then moved to magpie rss ... now am with simplepie..

    for my old wordpress i used magpie rss. but your tutorial so great to make me move to simplepie

    Hamza

  18. Comment 18 hamza

    just simple screenshot

    http://flickr.com/photos/dr_hamza/192949983/

    i can read the news without problems and it`s cached out well too..

    but still with this erorr ...

    many thanx

  19. Comment 19 Bruce

    Hamza, you need someone who knows PHP to advise how to fix an "undefined offset" notice. I'm afraid I don't have the knowledge to help (I'm a beginner). As I said, if I were you I'd try the SimplePIe Support Forum; they're really helpful in there!

  20. Comment 20 3stripe

    Wow, nice tut. I'll be trying this out for sure!

  21. Comment 21 Bruce

    Thanks James; I'll look forward to seeing how you can make it better!

  22. Comment 22 Matt

    Is there anyway to show the feeds in order by date instead of just randomly?

    Thanks for this tutorial!

  23. Comment 23 Bruce

    Matt, apparently it's "relatively easy" to do this, according to a thread in the Support Forum. Ryan promises a tutorial soon; keep an eye on the blog.

  24. Comment 24 Matt

    Awesome, thanks for pointing that out!

  25. Comment 25 WilderKaiser

    Hello Bruce! You did a really nice work...after I had wasted plenty of time to get a feed running on my blog, I just found your tutorial via simplepie. And, after all, it works out fine, as you can see it here (I only changed a few things, but not too many). Fabulous one, you saved my weekend at last. Thank you. WilderKaiser

  26. Comment 26 Bruce

    Glad it worked for you WilderKaiser. I hope you were able to spend the weekend away from the keyboard instead!

  27. Comment 27 Abhimanyu Chirimar

    somehow, i only end up with 1 result from the feed in this page.

  28. Comment 28 Bruce

    Abhimanyu, which 'this page' would that be? You realise the whole idea here is to show only one item (the most recent) per feed right?

  29. Comment 29 Abhimanyu Chirimar

    Ok this is embarassing.

    I was in a rush and browsing at 'work' and didn't end up finishing my thought.

    I just setup a WordpressMU and got wpmu-feed plugin up and running to consolidate all the feeds in the system. That feed I used with your code to try to setup a sidebar default for all users.

    I am a n00b I guess. So if you can help me use this to spew out 10 recent updates in 1 feed, that will be really appreciated. Thank you.

  30. Comment 30 Abhimanyu Chirimar

    Ok. got it working. mix of your code and some basic demo code from simplepie. I dont know if anybody here is interested in using this for a combined feed on MU.

  31. Comment 31 Bruce

    Glad you're sorted Abhimanyu; I'd not heard of WordpressMU before. I don't know whether that system can make use of standard WordPress plugins—because the obvious easy way to integrate a single feed would be to use the SimplePie WordPress plugin. Or, re-reading your comment, was your aim to produce a feed from combined sources rather than integrate a single existing one? Please forgive my fogginess!

    Anyway, why not post a tutorial on how you achieved your goal? Sounds like stuff worth sharing to me ;-)

    If you've done something new and creative using SimplePie, drop the developers a note as I'm sure they'd love to see what you did. The Support Forums there might be a good place for your how-to.

  32. Comment 32 Tom D

    Great workup !

    I use it to display random / latest posts from other blogs in the sidebar!
    I also have a full blown page but is it is being tweaked at the moment.

    Thanks Again.

    Tom.

  1. 1 SimplePie: Weblog » 1000 Downloads of Beta 2, Recognition, and a Progress Report
  2. 2 SimplePie: Weblog » Random statistics about SimplePie.org

Something to say?

Comments may be moderated (e.g. no commercial promotion), are subject to spam filtering, and should be relevant to this post—otherwise make contact.

Usable tags include <a href=""> <blockquote> <em>. Select any text and click to quote.