Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > General Support

General Support Questions about using the Easy PHP Calendar. (Not installation or customizations)

Closed Thread
 
Thread Tools Search this Thread Display Modes

Create RSS Feeds
Old 08-06-2005, 07:23 PM   #1
clavinniu
Calendar User
 
clavinniu is offline
Join Date: Aug 2005
Posts: 1
Default Create RSS Feeds

A client wanted to me to create an RSS Feed of their event listings for syndication. I was able to create one in under a half hour using easyPHPCalendar. It requires a template file, and a php file to generate the feed using only a few lines of code. I'm not sure if this meet RSS standards but it works in Firefox live bookmarks and a few readers I checked.

Listing Template For the RSSFeed
rss.php
PHP Code:
<!--head-->
<!--
head-->
<!--
body-->
    <
item>
     <
title>[title]</title>
     <
link>[url]http://www.domain.com/calendar.php#[/url][title]RSS Title Name</link>
     
<description><![CDATA[[descr]]]></description>
     <
dc:creator>EasyPHPCalendar</dc:creator>
     <
dc:date>[date][time]</dc:date>    
    </
item>
<!--
body-->
<!--
foot-->
<!--
foot-->
<!--empty-->
<!--empty--> 
The Actual RSS Feed
rssfeed.php
PHP Code:
<?php header("Content-type: text/xml");?> 
<?php echo "<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">" ?>
<channel>
    <title>EasyPHPCalendar</title>
    <link>http://www.domain.com/</link>
    <description>EasyPHPCalendar Events RSS Feed</description>
    <language>en-us</language>
<?php
$LIST
=1
$DF "M d"
$listMonths 1;
$noOld 1;
$template="rss.php"
require (
"calendar/calendar.php"); 
?> 
</channel>
</rss>
Firefox Live Bookmarks Code
Insert into the head of the page you want the live bookmarks to appear.
HTML Code:
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.domain.com/rssfeed.php">
 

Old 08-07-2005, 09:59 AM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,878
Default

Thanks for sharing! I've made a few changes to make the script "generic" for others to use. And I'll make this a sticky!
__________________
-- Brian

Questions?

Instructions: Version 6 - Version 7 | FAQ | Errors FAQ | Paths FAQ | Forums | Support
| Web Site Hosting
 

Old 10-18-2008, 12:35 PM   #3
ve9gra
Support Team
 
ve9gra's Avatar
 
ve9gra is offline
Join Date: Jun 2003
Location: New Brunswick, Canada
Posts: 4,965
Default

I have now announced a better/newer version of the RSS module which validates on the W3.org Feed Validator. It is also fully customizable, and allows you to either specify a $showCat directly in the feed file to limit all output, or pass the showCat variable through the URL which then allows you to use a single file but provide a feed for each of your categories.

A lot of work went into this module, and I hope that it will be useful for many of you.

http://www.epctutorials.com/modules/...r-your-events/
__________________
-- Gervais
EPC Tutorials... We're here to help!
Offering custom integration services. Contact me here.
* Not affiliated with EasyPHPCalendar or NashTech Inc.
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[OT] Can this forum send in RSS? Tod General Support 3 06-26-2005 04:32 AM



All times are GMT -4. The time now is 06:13 PM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |