Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-04-22 16:50:34

aurelian
Member
From: Barcelona, Spain
Registered: 2007-11-21
Posts: 13
Website

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

#15 2008-04-22 17:33:09

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#17 2008-04-22 18:14:32

aurelian
Member
From: Barcelona, Spain
Registered: 2007-11-21
Posts: 13
Website

Re: aao_friendfeed a Plugin for your sidebar

Ruhh wrote:

Ah okay. I will see if I can update my PHP server.

yup, it requires PHP 5 + simplexml and curl extensions.

Offline

#18 2008-04-22 20:30:59

aurelian
Member
From: Barcelona, Spain
Registered: 2007-11-21
Posts: 13
Website

Re: aao_friendfeed a Plugin for your sidebar

Main post updated for 0.3 :)

Offline

#19 2008-04-22 21:09:35

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: aao_friendfeed a Plugin for your sidebar

Re. SimplePie installation:

  1. Put the file simplepie.inc into your textpattern/lib folder
  2. Create a directory textpattern/lib/simplepie_cache/
  3. 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

#20 2008-04-22 22:30:46

aurelian
Member
From: Barcelona, Spain
Registered: 2007-11-21
Posts: 13
Website

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

#21 2008-04-22 23:03:56

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#22 2008-04-24 19:50:01

aurelian
Member
From: Barcelona, Spain
Registered: 2007-11-21
Posts: 13
Website

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:

  1. it knows about timezones (internally defined as arrays)
  2. it knows about date translations in 6-7 languages
  3. it knows about all the encodings on the planet
  4. it know about all the mime-types that can be encounter
  5. it knows to output and submit a feed entry to whatever web 2.0 service
  6. it knows how to embed and handle images or flash content
  7. it can handle caching
  8. php 4 support or not taking advantage of simplexml extension
  9. 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

Board footer

Powered by FluxBB