CML Reference Guide

Chapter 4.15:  Adding Items & Responses

[TOP] [UP] [PREV] [NEXT]

$add_resp(cnum prop inum owner author copied text)        {protected}
Adds text as a response to conference cnum, item inum.  The response is attributed to userid owner, and the name author is recorded with the response.  (Typically author should be the current name of owner.  If author is more than one word, it must be quoted, as in $quote(author).) 

Copied is a string that designates where this response was copied from.  It should be one of (a) 0, to indicate that this is an original response, (b) the one-word name of the conference it was copied from (for anonymously copied responses), or (c) a string of the form "conference_name item response original_date original_time [suppress]", quoted (with $quote) as one word.  The optional suppress keyword is 1 to suppress the "copied by" message.  0 or not supplied indicates 'show the "copied by" message'.  (The current userid is marked as the copier, see re_copier().)

Evaluates to the new response number if the adding succeeded, or "0" if it failed.  (Adding a response can fail if the user has read-only permission in the conference, or if the item is frozen.)  Records prop as the text property number.

$ad_resp(cnum prop inum text)        {protected}
Obsolete form of $add_resp().  Current user's userid and name are automatically used as owner and author.

$add_item(cnum prop owner author title copied text)        {protected}
Adds text as a new item.  The item is attributed to userid owner, and the name author is recorded with the item.  (Typically author should be the current name of owner.  If author is more than one word, it must be quoted, as in $quote(author).) 

Title is the title of the new item.  (Again, if title is more than one word, it must be quoted.) 

Copied is a string that designates where this item was copied from.  It should be one of (a) 0, to indicate that this is an original item, (b) the one-word name of the conference it was copied from (for anonymously copied items), or (c) a string of the form "conference_name item 0 original_date original_time", quoted (with $quote) as one word.  (The current userid is marked as the copier, see re_copier().)

Evaluates to the new item number if the adding succeeded, "0" if it failed.  (Adding an item can fail if the organizer has turned off adding new items.)  Records prop as the text property number.

$ad_author(name)        {protected}
Sets the author of the next item or response to be added, to the psuedonymn name.  This name will be used in place of the normal author name, in the next (and only the next) call to $ad_resp().

$chg_resp(cnum prop inum rnum text)        {protected}
Replaces the response (cnum, inum, rnum) with text and the new prop property value.

$chg_title(cnum prop inum title)        {protected}
Changes the title of item (cnum, inum) to title.  Prop is required, but ignored.

$chg_author(cnum inum rnum userid name)        {protected}
Change the owner of response cnum, inum, rnum to userid.  Mark the author to be name.  Requires organizer privilege for conference cnum.

$set_wrap(width)        {protected}
When text is added as an item or response, it is automatically column-wrapped before it is stored in the Caucus data files.  Set_wrap sets the wrapping position to width single-width characters.  A value of 0 turns column-wrapping off altogether.