RSS feed reader

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
junito
Forum Members
Forum Members
Posts: 28
Joined: Fri Oct 27, 2006 5:07 pm

RSS feed reader

Post by junito »

Hi,

I used to use a module called RSS2HTML to embed external RSS feeds into my site. This module doesn't seem to work properly with the lastest 1.4.1. I know there are other modules like piRSS, simplerss but I don't know if any of those are working properly with the latest version of the core module?

Does any use a rss reader on a CMSMS 1.4.1 site?

Junito
viebig

Re: RSS feed reader

Post by viebig »

yes I do

get lastrss http://lastrss.oslab.net/ , put it in a folder like /custom

the create a UDT , name it getfeed

customize the output the way you need it

Code: Select all


require_once("custom/lastrss.php");

$rss = new lastRSS;

// setup transparent cache
$rss->cache_dir = '/tmp/cache';
$rss->cache_time = 3600; // one hour

// load some RSS file
if ($rs = $rss->get($params['url'])) {

if ($params['type']=="latestul")
{
$r.= '<ul class="feeds">';
foreach ($rs['items'] as $post)
{
$r.= '<li><a href="'.$post['link'].'" rel="external">'.$post['title'].'</a></li>';
}
$r.= '</ul>';
}

return $r;
}
works great for me, has caching capabilities, I think it´s the better option

use it like

Code: Select all

{getfeed url="http://www.wordpress.com/rss"}
Last edited by viebig on Sat Sep 06, 2008 11:47 am, edited 1 time in total.
junito
Forum Members
Forum Members
Posts: 28
Joined: Fri Oct 27, 2006 5:07 pm

Re: RSS feed reader

Post by junito »

Thnaks !
viebig

Re: RSS feed reader

Post by viebig »

remember to add [solved]!
kumaran
Forum Members
Forum Members
Posts: 30
Joined: Thu Apr 03, 2008 6:43 am

Re: RSS feed reader

Post by kumaran »

Greetings viebig,


Your post...
----------------

get lastrss http://lastrss.oslab.net/ , put it in a folder like /custom

the create a UDT , name it getfeed

customize the output the way you need it


My Doubt:-
=======

I download the lastrss file from the http://lastrss.oslab.net site.

I couldn't understand UDT. Can you explain briefly and one more thing I copy and paste your code(getfeed.php -- I give the file name), this code contains files are separately are index.php please explain.

{getfeed url="http://www.wordpress.com/rss"}

I got the following error. please advise me.

string(119) "Smarty error: [in template:15 line 107]: syntax error: unrecognized tag 'getfeed' (Smarty_Compiler.class.php, line 590)"

Thanks & Regards,

Kumaran



Can you explain that
viebig

Re: RSS feed reader

Post by viebig »

ok.. a UDT is a User Defined Tag, it´s apirce of php code that cmsms can store on the database instead of a file.

In admin goto Extensions -> User Defined Tags

create a new one and name it getfeed.

insert the code from previous message, and edit it to point to your lassrss php path.

Then {getfeed} will process what in on the getfeed UDT.

This error is because there is no getfeed smarty plugin or UDT.

You need to create and name a udt before using it.

Good Luck msn: viebig at hotmail
viebig

Re: RSS feed reader

Post by viebig »

Hi Julian

It´s supposed to be latestul , latest from latest news ul from list (pretty confusing)

Thanks for the addition! I will keep my post how it was before, the force anyone else to get that, with your helper post!

Regards
Post Reply

Return to “Developers Discussion”