Hy,
I'm using the following code to display a list of topics and their
articles. Now i also want to display the attachments available.
But it stops with th error message in the subject after the line
where i want to fetch the attachmenst using listattachments().
Any idea?
Daniel
<?
// display all available sub-topics within the current topic tree
$lst = mgd_list_topics($global_topic->id, "reverse score");
if(!$lst) {
echo "<!-- topic $topic->id has no sub-topics. -->\n";
}else{
while($lst->fetch()){
echo "<p>\n";
echo "<a title=\"" . $lst->name . "\"
href=\"".$journal_root."/topic/" . $lst->id . ".html\"><img
src=\"/about/skin/".$user_style."/imgs/dot1.gif\" width=10 height=10
border=0></a> <a title=\"" . $lst->name . "\"
href=\"".$journal_root."/topic/" . $lst->id . ".html\"><font
face=\"Verdana,Arial,Helvetica\" size=2 style=\"text-decoration:none\"
color=\"#006699\">" . $lst->name . "</font></a><br>\n";
if($article = mgd_list_topic_articles( $lst->id,
"reverse score" )){
$articlecount = 0;
while($article->fetch()) {
$articlecount = $articlecount +1 ;
if ($articlecount == 1) {
echo " <b>·</b> <a
title=\"" . $article->title . "\" href=\"".$journal_root."/article/" .
$article->id . ".html\">" . $article->title . "</a> <font
face=\"Verdana,Arial,Helvetica\" size=2 style=\"text-decoration:none\"
color=\"#000000\">" . $article->abstract . "</font><br>\n";
} else {
echo " <b>·</b> <a
title=\"" . $article->title . "\" href=\"".$journal_root."/article/" .
$article->id . ".html\">" . $article->title . "</a><br>\n";
}
$currarticle = mgd_get_article($article->id);
$list = $currarticle->listattachments();
while ($list->fetch() ) {
echo "name: " . $list->name . "<br>\n";
}
}
}
echo "</p>\n";
echo "<hr noshade size=\"1\">\n";
}
}
?>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]