Hello,


> reset ($showlist);
>   while (list(, $id) = each ($showlist)) {
>   $article = mgd_get_article($id);

> These things I just pick up straight from the PHP manual, BTW. This
> exact construct is used there.

The problem for me is to find this stuff as I don't know what I need
to look for! :-)

Now I have several problems. First of all an error message:

Parse error: parse error in ROOT on line 3

line 3 would be: $topic_id = 26;

but I doubt that the counting is correct. Why should there be a
problem?
Then this whole construction shows only 3 lines (= 3 articles/topics)
which I solved by adding my root to that line

$topics = array(26, 28, 59, 62); reset ($topics);

But: it displays 2 lines of content from 26 now (well, makes sense)
and: it now also lists stuff that is old, very old (doesn't have
anything to do, though, with adding the 26). Actually the only new
thing that is listed comes from my root (26) but is also listed if I
don't add 26 to the above line. That's ok, it should be listed on top
anyway. But I need four lines and in the 2nd it should show the newest
stuff from 28, in the 3rd from 59 and in the fourth from 62.
With 26 in the above line I get an article from 26 in the 2nd line but
very old. If I take out the 26, I don't get that article in the 2nd
line but the article from 28 instead. That's ok, but it should be the
newest. And content from 62 is not shown at all. I really don't know
what's going on there.
Here's the whole construct:

<?
$showlist = array();

$article = mgd_list_topic_articles_all($topic_id); $displayed = 0;
                                       --------- was 26 before, but
                                       doesn't change anything, of
                                       course.
                                       
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;
}

$topics = array(26, 28, 59, 62); reset ($topics);
  while (list(, $topic) = each ($topics)) {
  $article = mgd_list_topic_articles($topic, "reverse created");
  if ($article && $article->fetch()) { $showlist[] = $article->id; }
}

reset ($showlist);
  while (list(, $id) = each ($showlist)) {
  $article = mgd_get_article($id);
?>

Alexander



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

Reply via email to