Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-29 14:14:01

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Export an RSS Feed!

Hi,

I’m wanting to show say the 5 last topics from my punBB forum on my homepage, in the exact same way that i would for the last 5 articles. I want it to be really really simple, and don’t want to have to uploads files and all that, just a simple plugin and tag syntax. I took a look at bit_rss but didnt like that I had to upload stuff to the root. I want a simple plugin file and thats it.

Any ideas? Thanks. x


~ Cameron

Offline

#2 2009-01-29 14:50:32

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

Re: Export an RSS Feed!

You need a valid XML parser, and library, that supports newest RSS and Atom stannards. Because of that fact, you will need some kind of parsing library, either a PHP module or a PHP script library.

So you probably have to get used to uploading stuff to your root, because ripping Simplepie, and it’s pals, isn’t fun – and those pals are too huge to fit a plugin.

My answer is: Simplepie library and Simplepie Textpattern plugin.

Offline

#3 2009-01-29 16:02:44

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Export an RSS Feed!

I remember doing something similar on a WordPress site and it didn’t require any root stuff, just some simple PHP?


~ Cameron

Offline

#4 2009-01-29 16:08:31

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: Export an RSS Feed!

remember doing something similar on a WordPress site and it didn’t require any root stuff, just some simple PHP?

Perhaps provide an example (with details) that might help people to see what that did.

But uploading the simplepie/magpie libraries is a one-off thing so it’s really no big deal.


TXP Builders – finely-crafted code, design and txp

Offline

#5 2009-01-29 16:14:30

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Export an RSS Feed!

It was such a long time ago that I used WordPress I can’t remember, but it was no more than 1-3 lines of code to get it to export an rss feed from a source.

<?php require_once(ABSPATH . WPINC . '/rss-functions.php'); echo '<ol>'; get_rss('http://www.ayudh.eu/feed/', $num = 8); echo '</ol>'; ?>

Something similar to that?

I’m really not big on relying on other files, that was what always bugged me about WP that all extra functionality was done with silly plugin folder with multiple files and content etc. I like that in TXP your extra bits are really just extra tags, that you can use.

The simplepie plugin is defo sweet though, it works great, just I’d prefer if either TXP shipped with it by default, the .inc file! OR if the plugin was somehow able to plug into TXP’s default RSS functions like WP does. x

Last edited by driz (2009-01-29 16:26:04)


~ Cameron

Offline

#6 2009-01-29 16:44:40

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,729
Website

Re: Export an RSS Feed!

Well, require_once(ABSPATH . WPINC . '/rss-functions.php'); is requiring another file too, and according to this that file is a RSSMagpie implementation.

I think, whether the functions are provided by php in an external file or via php that came from a file and is now stored in the database (a txp plug-in) is academic, it’s still “extra functionality”. Making it part of the txp install so that it is not “extra” just adds bloat and it still needs uploading, just sooner rather than later. I rather expect plugin authors will be reluctant to develop the same functionality from scratch.

With bit_rss, once you’ve uploaded the libraries once to the specified folder, you don’t need to worry about them anymore (the source attribute is only needed if you place the files in another location) and your tag becomes <txp:bit_rss feed="http://www.ayudh.eu/feed/" limit="8" /> plus your rss form. That’s pretty tidy, I think.

Last edited by jakob (2009-01-29 16:46:53)


TXP Builders – finely-crafted code, design and txp

Offline

#7 2009-01-29 16:53:01

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Export an RSS Feed!

Whats the difference between using bit_rss and the simplepie textpattern plugin? x


~ Cameron

Offline

#8 2009-01-29 17:10:08

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: Export an RSS Feed!

Offline

#9 2009-01-29 18:09:02

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Export an RSS Feed!

driz wrote:

I’m wanting to show say the 5 last topics from my punBB forum on my homepage, in the exact same way that i would for the last 5 articles. I want it to be really really simple, and don’t want to have to uploads files and all that, just a simple plugin and tag syntax. I took a look at bit_rss but didnt like that I had to upload stuff to the root. I want a simple plugin file and thats it.

garciat worked out a method which is also fine for txp


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2009-01-29 19:49:27

driz
Member
From: Huddersfield, UK
Registered: 2008-03-18
Posts: 441
Website

Re: Export an RSS Feed!

I prefer the simplepie method to both of those!

BUT what does bit_rss offer over the simplepie_txp plugin? They both use the simplepie.inc but different how?


~ Cameron

Offline

#11 2009-01-29 21:30:41

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Export an RSS Feed!

From looking at the information about the bit_rss and simplepie plugins the first difference I notice is that you seem to have more control over output with bit_rss using forms.

I’ve used the super basic features of simplepie but not used bit_rss.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB