On 6 Mar, Paul Newby wrote:
> It seems that function mgd_list_topic_articles()
> only lists articles under a specified topic when
> the 'up' field is set to 0. This extra condition
> isn't specified in the documentation. Can
> anyone comment on the reason for this?
> Seems more reasonable that it should list
> articles with a common topic independent
> of any other condition.
Hmm... another thing to add to the docs.
Anyway, the 'up' field is used to note articles
that are attached as replies to other articles.
That is why those won't show up in topic listings.
If you want to list the reply articles as
well, use tmgd_list_reply_articles(). Something
like this:
<?php
$topic = 123;
$article = mgd_list_topic_articles($topic);
if ($article) {
while ($article->fetch()) { ?>
<p><strong>&(article.title);</strong></p>
<?php $reply = mgd_list_reply_articles($article->id);
if ($reply) { ?>
<ul>
<?php while ($reply->fetch()) { ?>
<li>&(reply.title);</li>
<?php } ?>
</ul>
<p>&(reply.N); replies for article</p>
<?php }
} ?>
<p>&(article.N); articles in topic &(topic);</p>
<?php } ?>
You can find mgd_list_reply_articles from the Function
Reference.
> Paul N.
/Bergie
--
-- Henri Bergius -- +358 40 525 1334 -- [EMAIL PROTECTED] --
http://www.iki.fi/Henri.Bergius
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]