Welcome Guest, Not a member yet? Register   Sign In
Existing libraries for RSS and iCal generation?
#1

[eluser]NBrepresent[/eluser]
I've looked around the wiki and haven't found anything yet... Are there any existing CI libraries for RSS and iCal generation?

I'm just asking before I 'librarify' an existing class... I thought I would have to do that for the Monte Ohrt Google Maps class, and it was already done by someone!

Thanks!
#2

[eluser]NBrepresent[/eluser]
I found this class by Marijo Galesic and made some tiny tweaks. I'll add it to the wiki tonight. It's not much of a contribution, but I think that there should be an RSS generation library and I don't see one yet.
#3

[eluser]Derek Allard[/eluser]
Not iCal, but I wrote something up about RSS if you're interested.

http://www.derekallard.com/blog/post/bui...e-igniter/
#4

[eluser]NBrepresent[/eluser]
Very nice tutorial, I like your approach because it is more organized and there is a separate view. On the other hand, using this library the feed controller would just output the feed so there's no need for a view.
#5

[eluser]taewoo[/eluser]
Derek.. I followed your tutorial but when i try to load it in the browser, the browser asks me to download.. Is this a header issue? (By the way... browser screenshot attached)

Controller:
Code:
$data['encoding'] = 'utf-8';        
$data['feed_name'] = 'RedMol.com';        
$data['feed_url'] = site_url();        
$data['page_description'] = 'Real Estate Cashflow Investments';        
$data['page_language'] = 'en-us';        
$data['creator_email'] = '[email protected]';        
$data['entries'] = $this->blog_model->get_any_blogs();          
header("Content-Type: application/rss+xml");        
$this->load->view('feed/rss', $data);

View
Code:
<?php echo '<?xml version="1.0" encoding="utf-8"?>'; ?>
<rss version="2.0"    
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"    
    xmlns:admin="http://webns.net/mvcb/"    
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"    
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>        
    
        &lt;title&gt;&lt;?= $feed_name; ?&gt;&lt;/title&gt;    
        &lt;link&gt;&lt;?= $feed_url; ?&gt;&lt;/link&gt;    
        <description>&lt;?= $page_description; ?&gt;</description>    
        <dc:language>&lt;?= $page_language; ?&gt;</dc:language>    
        <dc:creator>&lt;?= $creator_email; ?&gt;</dc:creator>    
        <dc:rights>Copyright &lt;?= gmdate("Y", time()); ?&gt;</dc:rights>
        &lt;?php foreach($entries as $entry){ ?&gt;            
            <item>          
                &lt;title&gt;&lt;?= xml_convert($entry->title); ?&gt;&lt;/title&gt;          
                &lt;link&gt;&lt;?= site_url('blog/user/'.$entry->user_name.'/'.date("Y/m/d/", $entry->created).url_title($entry->title) . $entry->title) ?&gt;&lt;/link&gt;          
                <guid>&lt;?= site_url('blog/user/'.$entry->user_name.'/'.date("Y/m/d/", $entry->created).url_title($entry->title) . $entry->title) ?&gt;</guid>          
                <pubDate>&lt;?= date ('r', $entry->created);?&gt;</pubDate>        
            </item>            
        &lt;?php } ?&gt;        
    </channel>
</rss>




Theme © iAndrew 2016 - Forum software by © MyBB