Hi all.
As with everyone else here, I too like ChronoComments and think its the shizz so much praise is due to the people/person behind this extension - its pretty darn nifty.
I'm interested to find out of there is a way to enable an RSS feature for ChornoComments?
Any ideas?
As with everyone else here, I too like ChronoComments and think its the shizz so much praise is due to the people/person behind this extension - its pretty darn nifty.
I'm interested to find out of there is a way to enable an RSS feature for ChornoComments?
Any ideas?
Hi paperclip,
Thank you, the RSS feature may be added to a future release but at the current time is not implemented, its not something easy to do but it has some defined steps, if you are interested I may find some example code for you, you can look at any other component RSS code too!
Regards
Max
Thank you, the RSS feature may be added to a future release but at the current time is not implemented, its not something easy to do but it has some defined steps, if you are interested I may find some example code for you, you can look at any other component RSS code too!
Regards
Max
Hi paperclip,
Thank you, the RSS feature may be added to a future release but at the current time is not implemented, its not something easy to do but it has some defined steps, if you are interested I may find some example code for you, you can look at any other component RSS code too!
Regards
Max
Hi Max,
I'm glad to hear its in the pipeline already. If you have some example code which will give me solid starting point from which to work I would appreciate it. I'm no programmer but I don't mind the challenge of muddling through some code to see how far I can get.
Regards,
P.
it should be something close to this:
you can ask more about any technical problems.
Regards
Max
// set the basic link
$document =& JFactory::getDocument();
$document->setLink(JRoute::_('index.php?option=com_chronocomments');
// get the items to add to the feed
$db =& JFactory::getDBO();
$query = 'SELECT * FROM #__chronocomments';
$db->setQuery($query);
$rows = $db->loadObjectList();
foreach ($rows as $row)
{
// create a new feed item
$item = new JFeedItem();
// assign values to the item
$item->title = $row->title;
$item->name = $row->name;
$enclosure = new JFeedEnclosure();
$enclosure->url = JRoute::_(JURI::base().'index.php?option=com_chronocomments&view=video&format=raw&id='.$row->id);
// size in bytes of file
$enclosure->length = $row->length
$enclosure->type = 'video/mpeg';
$item->enclosure = $enclosure;
// add item to the feed
$document->addItem($item);
}
///here we will add a link to the feed like "RSS FEED"
// build links
$feed = 'index.php?option=com_chronocomments&format=feed';
$rss = array(
'type' => 'application/rss+xml',
'title' => 'ChronoComments RSS Feed'
);
$atom = array(
'type' => 'application/atom+xml',
'title' => 'ChronoComments Atom Feed'
);
// add the links
$document =& JFactory::getDocument();
$document->addHeadLink(JRoute::_($feed.'&type=rss'), 'alternate',
'rel', $rss);
$document->addHeadLink(JRoute::_($feed.'&type=atom'), 'alternate',
'rel', $atom);
you can ask more about any technical problems.
Regards
Max
This topic is locked and no more replies can be posted.