Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: January 16, 2010: Important security update
 
Pages: [1]
  Print  
Author Topic: RSS Feed Module and Publish dates [Solved]  (Read 1842 times)
supernet
Elxis Community
Hero Member
*****
Offline Offline

Posts: 2671


::: Rentasite Web Services :::


WWW
« on: December 03, 2009, 09:31:23 AM »

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?
« Last Edit: February 17, 2010, 12:19:15 PM by supernet » Logged

ArXoS
Hero Member
*****
Offline Offline

Posts: 547



WWW
« Reply #1 on: February 03, 2010, 04:04:23 PM »

i had the same problem, so i did some edit  Cheesy

1. components/com_rss/rss.php
change the line :
Code:
$query = "SELECT a.*, u.name AS author, u.usertype"
to this :
Code:
$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:
// 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:
// 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:
            $this->unix = 0;
to this :
Code:
            $this->unix = $dateString;

Problem solved  Grin
(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
« Last Edit: February 03, 2010, 04:21:44 PM by ArXoS » Logged

supernet
Elxis Community
Hero Member
*****
Offline Offline

Posts: 2671


::: Rentasite Web Services :::


WWW
« Reply #2 on: February 03, 2010, 07:23:48 PM »


Thanks Arxos.

Bookmarked. i will see if it works.
Logged

Sirigos
CreativeOptions - Solutions for Businesses
Elxis Community
Hero Member
*****
Offline Offline

Posts: 1851


The first member of Elxis


WWW
« Reply #3 on: February 04, 2010, 03:04:20 PM »

Bookmarked also !! Smiley))
Logged

ArXoS
Hero Member
*****
Offline Offline

Posts: 547



WWW
« Reply #4 on: February 04, 2010, 04:24:42 PM »

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
Logged

baghetta
Newbie
*
Offline Offline

Posts: 45



WWW
« Reply #5 on: February 06, 2010, 02:09:49 AM »

Hei! ArXoS thank you very much, you're great.
Me to i'm able now to feed twitter.
 Kiss
Logged
supernet
Elxis Community
Hero Member
*****
Offline Offline

Posts: 2671


::: Rentasite Web Services :::


WWW
« Reply #6 on: February 08, 2010, 02:29:56 PM »


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?
« Last Edit: February 08, 2010, 02:36:18 PM by supernet » Logged

ks-net
Elxis Team
Hero Member
*****
Offline Offline

Posts: 1793


Kostas Stathopoulos


WWW
« Reply #7 on: February 08, 2010, 03:17:17 PM »

com_rss rss.php line~162

Code:
$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 ....
« Last Edit: February 08, 2010, 03:18:59 PM by ks-net » Logged

supernet
Elxis Community
Hero Member
*****
Offline Offline

Posts: 2671


::: Rentasite Web Services :::


WWW
« Reply #8 on: February 09, 2010, 09:57:38 AM »


Thank you very much Kosta.

Here it is  http://www.connection.gr/rss/rss20.xml   with autonomous pages excluded.
Logged

supernet
Elxis Community
Hero Member
*****
Offline Offline

Posts: 2671


::: Rentasite Web Services :::


WWW
« Reply #9 on: April 14, 2010, 12:17:11 PM »


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

 Roll Eyes Huh
Logged

nikos
Elxis Community
Full Member
*****
Offline Offline

Posts: 234


WWW
« Reply #10 on: April 16, 2010, 09:18:43 AM »

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?
Logged
Pages: [1]
  Print  
 
Jump to: