On Mon, 2002-11-25 at 18:06, Will Shine wrote: > I am having troubles getting mgd_create_article to work. > > I was getting an access denied error from the sample code supplied on the > web site until i adjusted permissions. > > Now I fixed the permissions so that I no longer get an access denied > error but now I get an object does not exist error. > > Is there something that I am missing here?
Maybe. An article needs to be in a topic, so you'd call:
$topic = mgd_get_topic($id_of_topic_you_want_to_create_article_in);
if (!$topic)
{
echo "could not get topic, bailing out<br>\n";
exit;
}
mgd_create_article($up, $topic->id, ...);
You could also use the oop approach as suggested on:
http://www.midgard-project.org/manual/en/method.object-create.php
but at any rate be sure that the topic you want to create the article in
exists, and that the up field is either zero or points to an existing
article.
wkr,
--
Envida http://www.envida.net/
Armand A. Verstappen Graadt van Roggenweg 328
[EMAIL PROTECTED] 3531 AH Utrecht
tel: +31 (0)30 298 2255 Postbus 19127
fax: +31 (0)30 298 2111 3501 DC Utrecht
signature.asc
Description: This is a digitally signed message part
