Rss текст от статията

cHuBakA

Registered
Здравейте , имам следния код , който вади rss-а но ми изкарва само заглавието на статиите. Как може да изкарам и съдържанието (description). Пробвам всички $entry[posted], [desc],[rssdesc]....... и тнт..... но не става

Код:
<?php

if(file_exists("include.php"))
{
	require "include.php";
}
else
{
	echo "ERROR: a required file, include.php, is either missing or inaccessible.";
	exit;
}

$newURI = str_replace("/feed.xml", "", $HTTP_SERVER_VARS["REQUEST_URI"]);
$baseurl = 	"http://".$HTTP_SERVER_VARS["HTTP_HOST"].$newURI;

$query = $db->query("SELECT e.*, u.username AS author FROM $pre_entries e LEFT JOIN $pre_users u ON u.uid=e.aid ORDER BY posted DESC LIMIT 0, $settings[rsslimit]");

while($entry = $db->fetch_array($query))
{
	$pubdate = date("D, d M Y G:i:s T", $entry["posted"]);
	$items_output .= <<<RSS


<item>
	<title>{$entry['title']}</title>

	<description>
????????????????????  Тук какво да бъде ???????????????
	</description>

	<link>{$baseurl}/{$entry[year]}/{$entry[month]}/{$entry[day]}/{$entry[urltitle]}/</link>
	<pubDate>{$pubdate}</pubDate>
</item> 


RSS;
	$i++;

}

$output = <<<RSS
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
    <channel>
        <title>{$settings[title]}</title>
        <link>{$baseurl}/</link>
        <description>{$rssdesc}</description>
		<pubDate>{$pubdate}</pubDate>
		<lastBuildDate>{$pubdate}</lastBuildDate>{$items_output}
    </channel>
</rss> 

RSS;

header("Content-type: application/xml; charset={$config['encoding']}");
echo $output;

?>

Някакви идеи? 10x
 
Доколкото видях извличаш данните от таблица чието име е в променливата $pre_entries. Структурата и съдържанието на тази таблица може да видиш с phpMyAdmin или ако веднага след while сложиш var_dump() на масива $entry:

PHP:
.
.
.
while($entry = $db->fetch_array($query))
{
   var_dump($entry);
.
.
.
 

Back
Горе