Elxis CMS Forum
Support => Administration => Topic started by: CREATIVE Options on June 24, 2009, 17:44:09
-
Has anyone work on how we can populate RSS or ATOM with the latest contents from specific section ?
-
I think that requires modifying the component php code, as no such option is available through its configuration panel...
-
That is for sure.
-
oh :o I thought that you asked if there is a way through elxis administration ::)
Then you should modify /components/com_rss/rss.php lines 156-167, where the items are selected from the database:
// query of frontpage content items
$query = "SELECT a.*, u.name AS author, u.usertype"
."\n FROM #__content a";
if ($info[ 'onlyfrontpage' ]) {
$query .= "\n INNER JOIN #__content_frontpage f ON f.content_id = a.id";
}
$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 = '23' // THIS IS THE NEW LINE
."\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 ."' )";
$query .= ($info['multilingual']) ? "\n AND ((a.language IS NULL) OR (a.language LIKE '%$lang%'))" : '';
$query .= "\n ORDER BY ".$orderby;
In case you need more than one section add this line:
."\n AND a.sectionid IN ( '23', '24', '25' )
-
Well?? Did that work for you or not??
-
i think means when section A then display only items from sectionA in rss... when sectionB only items from B and no other section...
so that users can subscribe(only) to each section that are interested and not any other!
-
Actual my needs are many, so let me to explain.
First I would like to have one RSS or ATOM from all the Sections, short by publication time, newest first.
Second I would like to have RSS or ATOM for each one section, short by publication time, newest first.
Purpose:
for First is to replace it with the basic RSS or ATOM so I can feed the readers, feedburner, twitterfeed and etc
for Second is to let the users to select which section they want to be feed
apkoutsou, as for the modification that you propose didn't work.