Midgard uses article records to store article content in. Articles are grouped in topics. See Topic Records, Objects & Functions for a description of functions related to topics.
An article record contains information about an article, its owner and the topic it belongs to.
Fields of an article record
The id of the article record.
Points to the id of the article this record is a reply/followup to.
Points to the topic-id of the topic this record is under.
The title of the article.
An abstract of the article.
The content of the article.
Points to the person-id of the author of the article.
Date and time the article was created.
Pointer to a url containing extra information.
Date indicating a calendar start.
An integer representing the number of calendar days.
An integer pointing to a possible icon for this article.
An integer pointing to a possible view for this article.
An integer pointing to a possible printable version of this article.
A freeform information field.
A freeform information field.
A freeform information field.
The name of the article.
Points to the person-id of the creator of the article.
Points to the person-id of the last revisor of the article.
An integer representing the number of times the article has been revised.
Points to the person-id of the approver of the article.
Date and time of the last revision of the article.
Date and time the article has been approved.
An integer value that can be used to sort articles.
an integer value that can be used to filter articles.
Data and time the article has been locked.
Points to the person-id of the locker of the article.
Points to the sitegroup-id of the sitegroup to which the article belongs.
Midgard functions like mgd_get_article and mgd_list_topic_articles return objects upon success. This section describes the contents of those objects. Most object parameters map directly to the record fields described above. Only those object parameters that do not have such direct mapping will be explained further.
The functions listed within the object definition are the object methods that are available for the object. Usage information about those methods can be found in Object Methods.
/* Article Object Prototype */ Class article { var $N; # Only available with objects # returned by mgd_list_XXX functions. var $id; var $up; var $topic; var $name; var $title; var $abstract; var $content; var $author; var $date; var $adate; # Date format D b. Y (ex. 6th Aug 2000) var $aldate; # Date format D M Y (ex. 6th August 2000) var $extra1; var $extra2; var $extra3; var $score; var $type; var $created; var $creator; var $revised; var $revisor; var $revision; var $approved; var $approver; var $url; var $icon; var $view; var $print; var $calendar; var $acalendar; # Date format D b. Y var $alcalendar; # Date format D M Y var $startdate; var $enddate; var $calstart; var $calstop; function fetch(); # Only available with objects # returned by mgd_list_XXX functions. function create(); function update(); function delete(); function setsitegroup(); function getsitegroup(); function parameter(); function listparameters(); function searchparameters(); function setscore(); function settype(); function createattachment(); function updateattachment(); function deleteattachment(); function getattachment(); function listattachment(); function openattachment(); function serveattachment(); }