Elxis CMS Forum
Extensions => Modules => Topic started 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?
-
i had the same problem, so i did some edit :D
1. components/com_rss/rss.php
change the line :
$query = "SELECT a.*, u.name AS author, u.usertype"
to this :
$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 :
// 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 :
// 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 :
$this->unix = 0;
to this :
$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
-
Thanks Arxos.
Bookmarked. i will see if it works.
-
Bookmarked also !! :)))
-
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
-
Hei! ArXoS thank you very much, you're great.
Me to i'm able now to feed twitter.
:-*
-
Another question related to RSS Feeds. I want to exclude some particular content items from an rss feed. mainly
- Autonomous pages
- Records/items from IOS Downloads
any idea?
-
com_rss rss.php line~162
$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 ....
-
Thank you very much Kosta.
Here it is http://www.connection.gr/rss/rss20.xml with autonomous pages excluded.
-
Can the rss.php file be cloned and after that, modified differently ?
::) ???
-
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?