PERFECT!
Getting AuthorName and not just author makes a big difference and playing
with the difference between mgd_list_topic_articles_all,
mgd_list_topic_articles mgd_list_topic_articles_fast is what I was looking
for....the further into this I get the more impressed I am with all thought
that you guys put into this. I tried to build my own over last summer and
while it worked..for most of what it was supposed to do...the amount of
code overhead I built into it to take care of all of the special cases
which kept coming up just made me sicker and sicker.....I feel guilty and
dishonest just thinking about all of the ugly code my intern and I were
responsible for....Midgard is proving to be pretty elegant and for me that
is probably the highest praise....
kp
-----Original Message-----
From: Emiliano [SMTP:[EMAIL PROTECTED]]
Sent: Friday, January 07, 2000 4:46 PM
To: Ken Pooley
Subject: Re: FW: [midgard] a wee few questions about site strategies....
On Fri, 7 Jan 2000, Ken Pooley wrote:
> Well maybe I don't quite understand what I thought....if I do this...
>
> <? $article = mgd_list_topic_articles_all(19);
Ah, _now_ I understand. mgd_list_topic_articles_all gets all articles
of the named topic (19) and all subtopics thereof. What you want is
mgd_list_topic_articles or mgd_list_topic_articles_fast. Those will
only return the articles of the named topic itself.
> if ($article) for ($i = 0; $i < 5 && $article->fetch(); $i++) { ?>
> <p>
> <strong><a
href="/news/&(article.id);.html">&(article.title);</a></strong>
> <br>&(article.aldate);
> <? if ($article->author) { ?><br>
> &(article.author);<br>
> <? if ($article->abstract) { ?><br>
> &(article.abstract);<br>
>
> I still get what seems to be an author ID number...should I be getting
the
> author? Am I missnaming the place where the author info should live?
mgd_list_topic_articles will have the author information in
$var->authorname
(and the author ID in $var->author of course). The _fast function does not
set the authorname field, but you can get the information with
mgd_get_person($var->author) if you want to (but it'll be less fast than
the regular list).
Emile
--
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]