Elxis CMS Forum

Extensions => Modules => Topic started by: rentasite on December 03, 2009, 09:31:23

Title: RSS Feed Module and Publish dates [Solved]
Post by: rentasite on December 03, 2009, 09:31:23
I'm trying to register the RSS Feed url of my site  ( http://www.connection.gr/rss/rss20.xml ) to a site.  And i get this mesage: A feed needs to contain publish dates or GUIDs in order to work .

How can i show the date on my rss feeds?
Title: Re: RSS Feed Module and Publish dates
Post by: ArXoS on February 03, 2010, 16:04:23
i had the same problem, so i did some edit  :D

1. components/com_rss/rss.php
change the line :
Code: [Select]
$query = "SELECT a.*, u.name AS author, u.usertype"to this :
Code: [Select]
$query = "SELECT a.*, UNIX_TIMESTAMP(a.created) AS created_t, UNIX_TIMESTAMP(a.modified) AS modified_t, u.name AS author, u.usertype"

2. components/com_rss/rss.php
find the $item = new FeedItem(); and to the next lines :
Code: [Select]
// load individual item creator class
$item = new FeedItem();
// item info
$item->title = $item_title;
$item->link = $item_link;
$item->description = $item_description;
$item->source = $info[ 'link' ];
add the $item->date line :
Code: [Select]
// load individual item creator class
$item = new FeedItem();
// item info
$item->date = ($row->modified_t > 0) ? $row->modified_t : $row->created_t;
$item->title = $item_title;
$item->link = $item_link;
$item->description = $item_description;
$item->source = $info[ 'link' ];

3. includes/feedcreator.class.php
change the line :
Code: [Select]
            $this->unix = 0;
to this :
Code: [Select]
            $this->unix = $dateString;

Problem solved  ;D
(i don't write the line numbers cause i edited my elxis2006.4 with different line numbers. I think it will work in other version of elxis)

the results at http://www.greekmasa.gr/cache/rss20.xml
Title: Re: RSS Feed Module and Publish dates
Post by: rentasite on February 03, 2010, 19:23:48

Thanks Arxos.

Bookmarked. i will see if it works.
Title: Re: RSS Feed Module and Publish dates
Post by: CREATIVE Options on February 04, 2010, 15:04:20
Bookmarked also !! :)))
Title: Re: RSS Feed Module and Publish dates
Post by: ArXoS on February 04, 2010, 16:24:42
its working. I registered the rss feed to my facebook group with RSS Graffiti and now i have all the last articles of the site  to my facebook wall (http://www.facebook.com/group.php?v=wall&gid=277355756845). RSS Graffiti needs timestamps in order to work
Title: Re: RSS Feed Module and Publish dates
Post by: Luca on February 06, 2010, 02:09:49
Hei! ArXoS thank you very much, you're great.
Me to i'm able now to feed twitter.
 :-*
Title: Re: RSS Feed Module and Publish dates
Post by: rentasite on February 08, 2010, 14:29:56

Another question related to RSS Feeds. I want to exclude some particular content items from an rss feed. mainly


any idea?
Title: Re: RSS Feed Module and Publish dates
Post by: ks-net on February 08, 2010, 15:17:17
com_rss rss.php line~162

Code: [Select]
$query .= "\n LEFT JOIN #__users u ON u.id = a.created_by"
."\n WHERE a.state = '1' AND a.access = '29'"
."\n AND a.sectionid !='0'"
       ."\n AND a.id !='53'"
."\n AND ( a.publish_up = '1979-12-19 00:00:00' OR a.publish_up <= '". $now ."' )"
."\n AND ( a.publish_down = '2060-01-01 00:00:00' OR a.publish_down >= '". $now ."' )";
."\n AND a.sectionid !='0'"   ...  sectionid=0  is the autonomous pages

."\n AND a.id !='53'"   this line excludes a particular content item with id 53 ... notice (!)


you must clean cache to see changes ....
Title: Re: RSS Feed Module and Publish dates
Post by: rentasite on February 09, 2010, 09:57:38

Thank you very much Kosta.

Here it is  http://www.connection.gr/rss/rss20.xml   with autonomous pages excluded.
Title: Re: RSS Feed Module and Publish dates [Solved]
Post by: rentasite on April 14, 2010, 13:17:11

Can the rss.php file be cloned and after that, modified differently ?

 ::) ???
Title: Re: RSS Feed Module and Publish dates [Solved]
Post by: nikos on April 16, 2010, 10:18:43
When we create a user module, there is the option to add an rss feed url to get rss feeds from an external site. Publishing this module you see the rss feeds as link and text. My question is can we appear a date up of the title of each rss feed?