Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :
Jan
3rd
2008

Playing with an RSS reader

Posted in : Plugins & Widgets

SimplePie gets widgetised

After being nudged by Danny about an RSS reader I started a fair while back and never finished, mainly because I didn't have a use for it, I felt obliged to create an RSS Reader widget .... mainly to stop him nagging my arse off ;). Fortunately I'd come across an RSS Reader class a tad ago called SimplePie which would make the task a LOT easier, although it took a bit of pissing about to get it working the way I wanted. If you want to skip all the usual babble you can download the current version of the plugin here ( AM RSS Reader ), it does come with some system requirements which can be found on SimplePies System requirements page.

Installation and usage

Installing is the same as every other widget, download the file, unzip it, upload the am_rss_reader_plugin folder to your blogs folder. Meander over to admin > global settings > plugin install > install new plugin ( damn that's a hell of a path ), click the install link for the plugin. Now wander over to your skins widgets and click add new widget for whatever skin container you want it in. On the widgets settings page choose a custom title for the feed, the maximum number of items you want to display and slap in the feeds url ( note to self : validate the feed url ). If you feel brave you can play with the items html ( see the readme for replacement values ), the chances are that you won't need to change it. Once you have all your settings done, hit save. That's it, you now have the feed in your skin wherever your container is.

So, what can it do?

The short answer is "quite a bit actually", the long answer is that it has a bunch of settings which it utilises in a magic ceremony that results in the RSS feed being spat out, wherever you placed the widget, in a totally customised way. This magic is carried out by unemployed elves who are desperate for work now that christmas is over. So not only will you have a really cool widget, you'll also be helping save the elves, now is that cool or what? Of course this means that the widget stops working around the beginning of december for a few weeks but such is life ;) Rather than repeat all of the settings, what they do, why and how I actually made a readme ( yeah I know, me write a readme, whatever is the world coming to? )

Semi-technical stuff

Due to the fact that I dislike having folder permissions set to "let the world rape me", which is unavoidable on some shared hosting, I decided not to use SimplePies caching system, which uses files, and instead the results are cached in the database. You can set the cache duration to absolutely anything you like, the default is 60 minutes. At the moment I've only enabled the simplest of the SimplePies abilities, ( ie/ you can get post author, content, url, date, title ), but if anybody really wants some of the other functionality that's available with the class then just holler, it's not that difficult to incorporate them.

As always this is a pre-release version, although it's been tested in most 2.x flavours, so if it breaks let me know .... if it doesn't break then it'll be released as soon as I come up with a post that doesn't involve elves ;)

¥

*edit* You can now see the widget in action on my Feeds I read page.

Trackback URL (right click and copy shortcut/link location)

Trackback url for this post
Note : This trackback url is time limited so use it within 30 minutes or the SpamHound will snarl at you.

http://waffleson.co.uk/z/?k=36922592633103238498a16442aa0dbfc3b31ba70119e3809

Replied on : 01/03/08 @ 06:58 pm #1

If I had known that it was as easy as that, I'd have been asking for a something new every day for the last year.
 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14472 by ¥åßßå

Replied on : 01/03/08 @ 07:11 pm #2

Lol, and you'd probably still only have one widget :P

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 01/05/08 @ 01:27 am #3

This is Ryan from the SimplePie project.

Based on your description, I'm not sure if this is a plugin for blog software or not, but if so, I would encourage you to post a new wiki page to our plugins list. http://simplepie.org/wiki/plugins/start

You also said that "it took a bit of pissing about to get it working the way I wanted." What kinds of problems did you encounter? Did you check the documentation? Did you ask your questions on the forums? What things can we do to make these kinds of things easier/simpler?

Thanks!
 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14476 by ¥åßßå

Replied on : 01/05/08 @ 11:46 am #4

Hi Ryan,
Congratulations on writing such a cool API :D

This is a plugin ( widget ) for the 2.x series of b2evolution software that powers my blog. As soon as I do a "real" write up I'll add it to your wiki, thanks for the invitation.

Most of the problems I had were answered by reading your documentations and hints 'n' tips pages, the rest were to do with DIGG not returning any content when called via CURL. I know you've read my post on your forums by now so you'll have already seen my solution. It might be an idea to have a default user-agent for SimplePie_File() though?

Another feature that would be nice would be the ability to get the raw content of the feed without having to use the SimplePie_File() class, but that's just a usability enhancement and not a *problem*, although it did take me a while to find the solution.

I haven't had a chance to play with all of the abilities of SimplePie yet so there may be other suggestions in the future. If I have any I'll make them on your forums as that kinda feels like the appropriate place and would allow your other members to chime in without having to assault their senses by reading my blog ;)

Happy New Year :D

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14482 by Gary

Replied on : 01/08/08 @ 06:59 pm #5

Kinda neat Paul, thats a nice feeds reading page you got yourself.
Hope you are well, we are busy at work (thank goodness) lets hope its a good sign for the New Year ;)

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14483 by ¥åßßå

Replied on : 01/09/08 @ 01:22 am #6

Hi Gary, with a tad of luck I'll get chance to wander down tomorrow (urm, that'd be today, but after next sleep ), I'll show you how it all works and quietly throw in "move you to a new server" ... cos I'm subtle like that ;)

Hope you and yours have the very best of new years :)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14485 by Gary

Replied on : 01/09/08 @ 08:39 am #7

Cheers Paul, same to you and yours.
You got a new server then ?
Or have they just put a new HDD in the Linux Box ?

Gz ;)

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14486 by ¥åßßå

Replied on : 01/09/08 @ 10:23 am #8

It's a new one ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14487 by Gary

Replied on : 01/09/08 @ 11:01 am #9

Oh nice one, Linux or Windows based ?

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14488 by ¥åßßå

Replied on : 01/09/08 @ 11:09 am #10

It's a sweet lil quad core linux job ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14489 by Gary

Replied on : 01/09/08 @ 11:42 am #11

..........with a good HDD I hope 88|

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14490 by ¥åßßå

Replied on : 01/09/08 @ 11:53 am #12

Definitely a better HDD than the last one ;)

I'm on my way to yours now, I'll give yah a tour when I get there

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14491 by Gary

Replied on : 01/09/08 @ 04:59 pm #13

Lol, nice to see you again Paul.
Even though somebody else wished you a Happy Easter before me !!!

Thanks in advance for upgrading my blog, I look forward to playing with it ;)

Well we finally got all those parcels packed-up and they are on their way to the customers, job well done :)

Catch you soon.

Gz ;)

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14492 by ¥åßßå

Replied on : 01/09/08 @ 10:50 pm #14

Yeah, but you clinched it with halloween ;)

I'll move your blog sometime tomorrow, it can take up to 24 hours for the dns changes to show though, but I'm sure you'll be able to tell when it lands ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14493 by Gary

Replied on : 01/10/08 @ 09:01 am #15

Cheers Paul, thanks for that.
Gz :p

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14494 by Gary

Replied on : 01/10/08 @ 04:43 pm #16

Thanks for all your help Paul with the new server, blog upgrade / validation today.
It is most appreciated of you old chap ;)


Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14495 by ¥åßßå

Replied on : 01/10/08 @ 04:49 pm #17

No problem old bean ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14496 by Gary

Replied on : 01/10/08 @ 05:11 pm #18

Just so I know, How can I get into the control panel for my space on your server.

Can you email me the details please (URL)

Thanks
Gary

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14497 by ¥åßßå

Replied on : 01/10/08 @ 11:03 pm #19

Hi Gary, hit admin on this blog and there's a draft post with the urls ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14498 by Gary

Replied on : 01/11/08 @ 11:20 am #20

Good Morning or should I say Yabba-daba-do.

The only draft post I can see is 'Do your relatives follow?'

I am sure I am losing the plot :oops:

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14499 by ¥åßßå

Replied on : 01/11/08 @ 11:51 am #21

Make sure you're on the right blog, I have a few huh ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14501 by Gary

Replied on : 01/11/08 @ 12:13 pm #22

Lol, you mutli blog person you :)
I found that that, but is there not a CP for my webspace.
or is it only for the whole server ?

BTW I was looking for the formatting.php page to allow objects and styles, can I find it, can I heck.
Where have they hidden it this time ;)
Hope your having a good day, I am stuffing my face :p

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14502 by ¥åßßå

Replied on : 01/11/08 @ 03:58 pm #23

There's two links, the second one is your user control panel ;)

They hid the formatting options here :|

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14503 by Gary

Replied on : 01/11/08 @ 04:14 pm #24

Lol :p, thanks Paul ;)

Have a great weekend

Gz :D

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14504 by Gary

Replied on : 01/11/08 @ 04:44 pm #25

Hey, that's a might good box of tricks in the C.P
I am well impressed with it. :p

I am now a fully signed up member of the blogs forum. :)

Gz ;)

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14505 by ¥åßßå

Replied on : 01/11/08 @ 11:05 pm #26

88|

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14507 by Gary

Replied on : 01/12/08 @ 09:45 pm #27

Yes, I have been posting on the forums and looking around your new severs C.P.
I am very impressed. :p

My girls have found a use for keljem.com ;)

Kelsey found a good use
and so did Jemma

They only started tonight but were having fun:)

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14508 by ¥åßßå

Replied on : 01/12/08 @ 10:51 pm #28

Bloody hell *runs off to disable KelJem.com before I get a rep for hosting pink sites* ...... ooops hang on, I used to have a pink site ( lol, must resurrect that look one day, it was very .... bright )

Seen yer posts on the forums, even answered one of your questions ( in a bloody long line of questions of yours that I've answered ;) ) .... told yah the members would be able to help you huh? ;)

¥
ps. you need to learn bbcode for the forums, I'll show you some next time I'm at yours ( it's pretty much the same as the bbcode on your blog ;) )

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14509 by Gary

Replied on : 01/13/08 @ 11:19 am #29

Cheers Paul,
Catch ya on the forums !!!

Gz :p

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14510 by Gary

Replied on : 01/13/08 @ 11:26 am #30

Paul,
Just found this on Ed B's blog.

Enable Javascript and give the page time to load and then wait a few seconds - its well worth it.

Best shopping website ever

Gz ;)

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14511 by ¥åßßå

Replied on : 01/13/08 @ 01:03 pm #31

lol, yer playing catch-up ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 417

Joined : 04/04/05

Reply to comment 14512 by Gary

Replied on : 01/13/08 @ 06:02 pm #32

Its good though, isn't it ?

Gz:)

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14513 by ¥åßßå

Replied on : 01/13/08 @ 07:17 pm #33

it's certainly imaginative ;)

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 01/17/08 @ 04:42 pm #34

Sorry to go off-topic, but I wanted to talk about the SimplePie plugin thingie. I FINALLY got back to giving it a go and it hung and hung and hung and hung. Did I mention it hanged up my page?

I'm pretty sure the issue is that it was trying to read the feed from h t t p : / /, which it pretty much couldn't do. Therefore I would suggest the default "what feed to read" be b2evolution's news page, or whatever.

And the forum thread where you described how you made it a stand-alone page is in my "watched" list because that is really the coolest functionality imaginable. Lots of feeds out there yah?

Sorry all. We can now go back to ... what was it being discussed here?
 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14527 by ¥åßßå

Replied on : 01/17/08 @ 06:04 pm #35

Did your page hang? :roll:

I need to add some validation to the plugin for the feed url but having it default to evo news sound like a plan I can live with ;) We'll hopefully be making a release version soon which will include the checks.

You should bookmark all my forum posts, they're all cool :D

As an aside, and still nowhere near the topic, I've pretty much got the new version of BOPIT running on astonishme, fancy having a play from a plugin developers perspective? ;)

¥

ps. I note you didn't mention the fact that clicking on my smilies work now, after all your bitchin' about it :|

I may have opened the door, but you entered of your own free will

 
 

Replied on : 01/25/08 @ 07:49 am #36

:?: Hooray!

Yeah sure re bopit. I'm seeing where it doesn't do much right now yah? Like I'm guessing reading the xml file is a thing of the past? I was just in astonishme's backside and the controller was active but I didn't see anything that made sense for me to do about it knowing a plugin of mine is updated.

Many things on my plate again. Too much perhaps?
 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14539 by ¥åßßå

Replied on : 01/26/08 @ 11:23 am #37

Hi EdB,
I've just updated the developer notes ( BOPIT for developers ) on the original post, hopefully it explains everything you need to know.

Maybe you just need a bigger plate? :roll:

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 02/27/08 @ 02:29 am #38

I can't get the widget to reed my Stumbles feed

http://www.stumbleupon.com/syndicate.php?stumbler=4857980

It validates fine, any suggestions?

 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14586 by ¥åßßå

Replied on : 02/27/08 @ 07:42 am #39

Hi Troy,
I just added that url to my feeds page with absolutely no problem. It might be worth looking at your php info and seeing if you have curl and/or fsock available.

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 02/28/08 @ 02:59 am #40

Thanks for the great plugin. My only comment is that I wish I could have multiple copies of the widget running on my page.

I tried embedding two copies of the RSS plugin. One on the top and one on the right sidebar but the plugin seems to take the style from the first instance. Even if I type a style under the CSS Class text box, it doesn't take it.

Is this something you can fix?

another idea would be to have this plugin display items from multiple feeds. Great job other wise.
 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14588 by ¥åßßå

Replied on : 02/28/08 @ 09:40 am #41

The chances are that if you download the plugin again then you'll find the css stuff is cured ;)

SimplePie does have the ability to combine multiple feeds into a single feed, but I'd need to have a play to see if this is still possible whilst using the database instead of files to cache the feeds.

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 03/28/08 @ 03:33 am #42

I tried using the Max Length: "This is the maximum number of words to display of the items content, 0 = complete content"

But it didn't work for me. I kept getting an error on line 363 of the plugin.

Instead of words, is there a way to limit by # of characters?
 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14621 by ¥åßßå

Replied on : 03/29/08 @ 07:48 am #43

Hmm, that's a tad weird because in my version that line is a comment :p

I'll go find the latest version and zip it up for you so that we're both on the same page. Hopefully that will also cure your error.

The code can probably be amended to limit by number of characters, I picked "words" so that you didn't end up with some gibberish half word when the limit was hit, although there are plans for curing that as well ;)

¥

I may have opened the door, but you entered of your own free will

 
 
tilqicom users avatar

Posts : 28

Joined : 06/02/08

Location : teh lonely country

Reply to comment 15056 by tilqicom

Replied on : 10/04/08 @ 03:23 am #44

bloody terrific!!!:crazy:

test

 
 

Replied on : 02/09/09 @ 09:45 pm #45

Installed plugin on my 2.4.5 with some excitement. This plugin is exactly what I'd been looking for. Seemed to work for a bit, then page hung showing only sidebar, and then Firefox did that thing it very occasionally does, when it opens loads of blank tabs. Ever get that? PITA. Anyway, I've turned off the plugin with great reluctance. Not sure what's wrong there. Will give you a login ¥ if you want a look.
 
 
¥åßßå users avatar

Posts : 1057

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 15265 by ¥åßßå

Replied on : 02/10/09 @ 09:55 am #46

That's a tad weird @ tabs. The "hang" is probably when it's updating the feed data, it's governed by the speed of the server(s) it's calling.

A login would be cool ;)

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 02/11/09 @ 08:45 am #47

Yes, that tab thing happens occasionally with javascript I've found. Usually the stuff I write myself. Anyway, panic over, I've found another way to do it
http://remysharp.com/2007/05/18/add-twitter-to-your-blog-step-by-step/

Although that had to be conditional commented to keep out IE6.

Thanx v much for the offer of help Mr ¥, and keep those plugins coming.
 
 

Leave a comment

Your email address will not be displayed on this site.
Your URL will be displayed.
About you

Just fill in the bits you want, none of it is required



Your email address will only be used to send you adverts for viagra and rolex watches.



(Line breaks become <br />)
Leave a comment
Code:
=> :!: :?: :idea: :) :D :p B) ;) :> :roll: :oops: :| :-/ :( >:( :'( |-| :>> ;D :)) 88| :lalala: :crazy: >:XX :o
 
 
 

X