Hi,
here's the code that worked for me.
<?
mgd_auth_midgard(somelogin,somepassword,0);
// user "somelogin" has to exist in midgard and be
// authenticated in order to create articles
// also he most have rights to view topics/articles.
// third parameter sets cookie if =1
$midgard = mgd_get_midgard();
// define article fields
$up = 0;
$topic = 47; //change to id of topic you will store your articles in
$title = "some_title";
$name = "some_name";
$author = $midgard->user;
$abstract = "";
$content = "";
$calstart = "0000-00-00";
$url = "";
$caldays = 0;
$icon = 0;
$view = 0;
$print = 0;
$extra1 = "";
$extra2 = "";
$extra3 = "";
$type = 0;
mgd_errno();
// create the article
$article = mgd_create_article( $up, $topic, $name, $title, $abstract,
$content,
$author, $url, $calstart, $caldays, $icon,
$view, $print, $extra1, $extra2, $extra3,
$type);
if( ! $article ) {
//error, say why
echo "Error creating article!!!.<br>\n";
echo "reason: " . mgd_errstr();
}
else
{
$param = mgd_get_article($article);
$param->parameter("something","new","parameters are great");
$param->parameter("something","newer","you can enter more than one");
}
>Auth is set to required.
not necessary with above code...
have fun,
alex
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]