On Fri, Mar 02, 2001 at 11:57:07PM -0500, Enrique Vega mentioned:
> on 3/2/01 6:58 AM, John P . Looney at [EMAIL PROTECTED] wrote:
> > I've just done as David told me, and it's working fine.
> Kate,
> Would you post the completed working code for getting the topics. Maybe this
> would be something good to add to the midgard manual as an example for
> getting topics?
It's quite simple, and I'm using it for generating the navbar in my
style for http://midgard.linux.ie if you want to see how it turns out;
<?php
$topic = mgd_list_topics(0, "reverse score");
if(!$topic) {
echo "mgd_list_topics(0) failed.<br>";
echo "reason: " . mgd_errstr();
}else{
while($topic->fetch()){
$this_topic= mgd_get_topic($topic->id);
if($this_topic->sitegroup) {
echo "<TR><TD><IMG alt=\"\" src=\"/blobs/images/grad.gif\"
border=0></TD><TD> \n";
echo "<A
href=\"/articles/$this_topic->name\">$this_topic->name</a></TD></TR>";
}
}
}
?>
(Next of course, is to come up with nice navigation code once you *get*
to "/articles/$this_topic->name/"!
Should this be annotated to the midgard manual ?
Kate
--
When I say 'free', I mean 'free': free from bond, of chain or command:
to go where you will, even to Mordor, Saruman, if you desire. "
-- Gandalf, paraphrasing the choice between Free and Non-free software
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]