Location: PHPKode > projects > Content*Builder > modules/rssbox/rssBox.php
<?php
	require_once "XML/RSS.php";

	$rssBox =& new XML_RSS($resource);
	$rssBox->parse();
	
	$rssBoxLink = array();
	$rssBoxTitle = array();
	$rssBoxDescription = array();
	
	foreach ($rssBox->getItems() as $item) {
	    $rssBoxLink[]        = $item['link'];
		$rssBoxTitle[]       = $item['title'];
		$rssBoxDescription[] = $item['description'];
	}
	
	$rssBoxChannelInfo = $rssBox->getChannelInfo();
	
	$tpl->clear_assign("rssBoxValue");
	$tpl->assign("rssBoxValue", 
		array ( 
			"CHANNELNAME" => $rssBoxChannelInfo[title],
			"CHANNELLINK" => $rssBoxChannelInfo[link],
			"CHANNELDESC" => $rssBoxChannelInfo[description],
			"TITLE"       => $rssBoxTitle,
			"LINK"        => $rssBoxLink,
			"DESCRIPTION" => $rssBoxDescription
		)
	);
	$tpl->display("rssBox.template");	
?>
Return current item: Content*Builder