Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: aao_friendfeed a Plugin for your sidebar
So, SimplePie is really awesome, if you want to parse whatever feed in the universe that’s the plugin to use!
However, I’ll continue to improve & update aao_friendfeed.
And it makes sense for me since the source-code for the SimplePie class has 13316 lines while the plugin for Textpattern is not very straight-forward on installation (you have to download stuff and place strange files on do know what folders).
Just to make an idea, total number of source code lines in lib and include folders from a default Textpattern 4.0.6 installation is equal with 21709 (source cloc).
Offline
#14 2008-04-22 17:16:01
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: aao_friendfeed a Plugin for your sidebar
Hm, I get this error:
Fatal error: Call to undefined function: file_put_contents() in /home/public_html/textpattern/lib/txplib_misc.php(574) : eval()’d code on line 25
<txp:Ruhh />
Offline
Re: aao_friendfeed a Plugin for your sidebar
That’s a function that was introduced in PHP5. I suspect your server is using PHP4 and does not support this function yet.
Offline
#16 2008-04-22 17:41:18
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: aao_friendfeed a Plugin for your sidebar
Ah okay. I will see if I can update my PHP server.
<txp:Ruhh />
Offline
Offline
Re: aao_friendfeed a Plugin for your sidebar
Main post updated for 0.3 :)
Offline
Re: aao_friendfeed a Plugin for your sidebar
Re. SimplePie installation:
- Put the file simplepie.inc into your textpattern/lib folder
- Create a directory textpattern/lib/simplepie_cache/
- Install the plugin a.k.a. upload a textfile to the TXP plug-ins
Use <txp:feed>http://feed.url</txp:feed>
to get the default output.
IMHO: I would prefer to put more programming effort into the SimplePie plug-in to get more features from the available impressive SimplePie options into Textpattern (instead of developing another specialized feed parser).
The same is true for an existing friendfeed solution for Textpattern: asv_tumblelog. asv_tumblelog also uses SimplePie and makes friendfeed dispensable for TXP as you can mix your feeds yourself AND collect them as articles!!! You also have a speed-blogging solution included via a simple bookmark. The asv_tumblelog plug-in needs polishing!
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: aao_friendfeed a Plugin for your sidebar
merz1, SimplePie is great, asv_tumblelog is also cool, they both implement awesome features with tones of documentation and screenshoots,
but don’t get me wrong: textpattern was created with simplicity in mind. And that’s what I like about it.
Also, I do believe that the same rule should apply to plugins: they have to be simple to install and use and to do just one thing.
And, I’m scared about that number: 13316 lines of code(all in one .inc file) to output my cool friendfeed on the sidebar of my blog.
How am I expected to debug such thing anyway?
One could write a ecommerce solution with pay-pal integrated and product tracking in PHP using the same amount of lines.
As for asv_tumblelog, probably when I’ll look for a tumblelog system I’ll use it, but right now I don’t want a plugin to change my cool admin interface just to display a feed on my sidebar.
btw, you also have to add 0. download simplepie.inc
on your install instructions, I’ve just read some comments on that.
And with this I consider the “case” closed but I’m still open to constructive criticism.
Last edited by aurelian (2008-04-22 22:42:17)
Offline
Re: aao_friendfeed a Plugin for your sidebar
aurelian wrote:
And, I’m scared about that number: 13316 lines of code(all in one .inc file) to output my cool friendfeed on the sidebar of my blog. One could write a ecommerce solution with pay-pal integrated and product tracking in PHP using the same amount of lines.
Actually that line number is with empty lines, documentary and recular comments. If you remove them, then number is way smaller. Maybe cut by 3/4 from the original?
But yes, still simplepie is quite large, but it does do the work perfectly. Could you really write documention, comments and code with that amount of lines, if the product is ecommerce? Isn’t the FAQ mostly aboute 50 pages? Where is the code then? Probably it’s magic ;D
Offline
Re: aao_friendfeed a Plugin for your sidebar
cloc counted: 1080 blank lines 1737 comments 10499 code => 13316 total lines
but this is not my point…
SimplePie is that large mainly because of:
- it knows about timezones (internally defined as arrays)
- it knows about date translations in 6-7 languages
- it knows about all the encodings on the planet
- it know about all the mime-types that can be encounter
- it knows to output and submit a feed entry to whatever web 2.0 service
- it knows how to embed and handle images or flash content
- it can handle caching
- php 4 support or not taking advantage of simplexml extension
- of course, it knows how to handle all kind of feed type: rss or atom
So, I already said that it’s a great library, but it dose all those things beyond my simple needs: parse an XML and show 5 entries on my textpattern powered blog, on the sidebar.
That’s it.
Offline