I have a problem with RSS feeds in Joomla 1.5.
I use Joomla 1.5 and custom component. I tried to add rss feeds. I don't know what is the problem, but no data is displayed in firefox google reader. I tested with Chrome and it displays information, but only pure XML (not styled). And if I tried google reader with Chrome, then no information again.
Only thing that appears in google reader, is the site description. And instead of information, I only get "(title unknown)". This is the file that takes news and puts them into RSS feed. Maybe somebody can understand what is wrong with it :).
$xml = new XMLWriter();
$xml->openURI('php://output');
$xml->startDocument("1.0");
$xml->setIndent(true);
$xml->startElement('rss');
$xml->writeAttribute('version', '2.0');
$xml->writeAttribute('xmlns:g', 'http://base.google.com/ns/1.0');
$xml->startElement("channel");
$xml->writeElement("title", $mainframe->getCfg('sitename'));
$xml->writeElement("description", $mainframe->getCfg('MetaDesc'));
$xml->writeElement("link", JURI::root());
if($this->projects){
// start listings
foreach ($this->projects as $project){
$xml->startElement("item");
$xml->writeElement("g:title", $project[title] );
$xml->writeElement("g:description", $project[description] );
$xml->endElement();
}
}
$xml->endElement(); // rss
$xml->endDocument();
$xml->flush();
This is corresponding xml
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
<channel>
<title>MyProject</title>
<description>
My project description
</description>
<link>http://mysite.com</link>
<item>
<g:title>Copywriter</g:title>
<g:description>...</g:description>
</item>
<item>...</item>
<g:title>Design Manager</g:title>
<g:description>...</g:description>
</item>
</channel>
</rss>