CML Reference Guide

Chapter 4.15:  Adding Items & Responses

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

$add_resp(cnum prop inum owner author copied text)
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 either 0, to indicate that this is an original response, or a string of the form "conference_name item response original_date original_time", quoted (with $quote) as one word.  (The current userid is marked as the copier, see re_copier().)

Evaluates to "1" if the adding succeeded, "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)
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)
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 either 0, to indicate that this is an original item, or 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_item(cnum prop title text)
Obsolete form of $add_item().  Current user's userid and name are automatically used as owner and authorNote that (for $ad_item() only) there must be a newline between title and text.  (See $newline().) 

$ad_author(name)
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() or $ad_item().

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

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

$set_wrap(width)
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.