Alexander Levenetz wrote:

> to display the last four articles from my root topic, excluding a
> couple subtopics. What I would like to do now is to again display four
> articles, but the first line should be the most recent from my root
> (and therefore excluding all the subtopics I gave here - but only
> those), the second line should display the last one from topic 28, 3rd
> line from topic 59 and the last from 62. As the above structure is
> part of a layout I cannot just duplicate it. Is there a way to do
> what I'd need? TIA,

Something in the order of:

<?
$showlist = array();
 
$article = mgd_list_topic_articles_all(26); $displayed = 0;
while ($displayed == 0 && $article && $article->fetch()) {
  if (mgd_is_article_in_topic_tree(94, $article->id)) { continue; }
  if (mgd_is_article_in_topic_tree(111, $article->id)) { continue; }
  if (mgd_is_article_in_topic_tree(28, $article->id)) { continue; }
  if (mgd_is_article_in_topic_tree(62, $article->id)) { continue; }
  if (mgd_is_article_in_topic_tree(59, $article->id)) { continue; }
 
  $displayed++;
  $showlist[] = $article->id;
}
 
foreach (array(28, 59, 26) as $topic) {
  $article = mgd_list_topic_articles($topic, "reverse created");
  if ($article && $article->fetch()) { $showlist[] = $article->id; }
}
 
foreach ($showlist as $articleid) {
  $article = mgd_get_article($articleid); 
?>

Emile

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to