[eluser]elaniobro[/eluser]
I searched and read the few topics concerning this issue. None of them corrected my issue so I am posting a new thread.
Controller: rss.php
Code:
<?php
class Rss extends Controller
{
function Rss()
{
parent::Controller();
}
function index()
{
$this->load->helper('xml');
$data['query'] = $this->db->get('thoughts');
$data['title'] = 'Example | Thoughts';
$data['creator'] = '[email protected]';
$data['link'] = 'http://www.example.com/thoughts';
$this->load->view('rss', $data);
}
}
?>
view: rss_view.php
Code:
<?php # echo'<?xml version="1.0" encoding="utf-8"?>';?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title><?= $data->'title'?></title>
<link><?= $data->'link';?></link>
<description><?php # $page_description; ?></description>
<dc:language><?php # $page_language; ?></dc:language>
<dc:creator><?= $data->'email';?>m</dc:creator>
<dc:rights>Copyright <?php # gmdate("%Y", time()); ?></dc:rights>
<dc:date><?php #gmdate("%Y-%m-
T;%H:%i:%s%Q" time()); ?></dc:date>
<admin:generatorAgent rdf:resource="http://www.codeigniter.com/" />
<?php foreach($data as $row): ?>
<item>
<title><?= xml_convert($row->title); ?></title>
<link><?php # $row->permalink; ?></link>
<guid><?php # $row->permalink; ?>#When:<?= gmdate("%H:%i:&#xsZ;", $row->date); ?></guid>
<description><?php # xml_convert($row->description); ?></description>
<dc:subject><?= xml_convert($row->tag); ?></dc:subject>
<dc:date><?php # gmdate"%Y-%m-
T;%H:%i:%s%Q", $row->date); ?></dc:date>
</item>
<?php endforeach; ?>
</channel>
</rss>
any ideas?