Caucus 4.3 'Bonanza' Macros
Version 1.00 revised 8 November 1999
Version 1.02 revised 22 December 1999
Version 1.03 revised 20 December 2001Bonanza is a code-name for a set of extensions to Caucus 4.1 that allow for easier customization of the base interface, especially the "Caucus Center", conference home pages, and new user registration page. Bonanza is partly based on abstracting specific customizations originally implemented by Scott Burns.
Bonanza includes some additional macros for this purpose. They are described in detail below, in alphabetical order by name. In all of the macros, argument conf_name is a conference name; always use underscores (instead of spaces) in conference names. Text is any arbitrary text, including spaces or other macro calls. The names assigned to these macros (attempt to) reflect an object hierarchy: the highest level object first, followed by the next level sub-object, and so on.
Some of these macros are "conditional", in the sense that they expand to and evaluate their text argument if the condition is true. If it is not true, then the macro evaluates to nothing. The conditional macros are marked by a "{cond}" after the macro name. The names of conditional macros contain a verb: "is", "has", etc. to indicate their usage.
- %conf_file_url (conf_name user item resp filename)
- This macro provides access to a file uploaded into a response. It evaluates to the full, absolute, URL for file filename uploaded by user into conference conf_name, item item, response resp.
- %conf_has_new (conf_name text) {cond}
- If there is "new" material in conf_name for the current user, expand text. (The operation of this macro is undefined if the user is not allowed in conf_name.)
- %conf_is_allowed (conf_name text) {cond}
- If the current user is allowed in conf_name, evaluate text.
- %conf_item_url (conf_name item)
- Evaluates to the full, absolute, URL for the page for item in conf_name. (For most applications, you're better off using the "special" Caucus URLs, e.g. "/caucus/conf_name/item" would be better than "%conf_item_url (conf_name item)". But if you really need the absolute URL, process id and all, use %conf_item_url.)
- %conf_link (conf_name text)
- Expands to a link to the conference home page for conf_name. Text is evaluated, and the result becomes the text of the link. (Text can be another macro call, or even an image.)
- %conf_name_with_new (conf_name text) {cond}
- If the user is allowed in conf_name, evaluates to a link (with text text) to conference conf_name, that includes a "new" icon if anything in the conference is new to the current user.
Note: this is a "convenience" macro, in that it is just a simple arrangement of the other macros. There are many possible combinations of the "Bonanza" macros, this is just one of the most common. %conf_name_with_new (cn text) is is exactly equivalent to:
%conf_is_allowed (cn %conf_link (cn text %conf_has_new (cn %icon_new())))
- %conf_url (conf_name)
- Evaluates to the full, absolute, URL for the conference home page for conf_name. (For most applications, you're better off using the "special" Caucus URLs, e.g. "/caucus/conf_name" would be better than "%conf_url (conf_name)". But if you really need the absolute URL, process id and all, use %conf_url.)
- %icon_new()
- Evaluates to an in-line image of the standard Caucus "new" icon.
- %ifs_page_link (item resp text)
- IFS stands for "InterFace Storage". Under Bonanza, each Caucus interface is assigned a special "Interface Storage" conference, which contains content and control information used to customize the interface.
An IFS page is a standalone Caucus interface page, usually reachable from the Caucus Center, that contains the standard header and buttons, and then the content of a specific item in the Interface Storage conference. This macro evaluates to a link (with text text) to an IFS page, which draws its content from item item, response resp, in the Interface Storage conference.
- %ifs_resp (item resp)
- Evaluates to the CML text of item item, response resp, in the Interface Storage conference.
- %image (URL [width height [alt text]])
- Displays the contents of URL as an in-line image, i.e. evaluates to an HTML <IMG ...> tag, using URL as the source of the actual image file. Optional arguments width and height may be used to explicitly set the size of the image, and optional argument alt text may be used to set the value of the "ALT=" parameter. (ALT is used for non-graphical browsers, and also as a tiny pop-up box in graphical browsers that appears when the mouse rests on the image.)
- %itemtitle (inum)
- Must be used "within" a conference. Displays (just!) the title of item inum as link that points to the very beginning of that item.
- %response_new (inum linktext...) {cond}
- Must be used "within" a conference. If item inum is new or has new responses, displays linktext as a link to the first new response in that item. Linktext may be any text, including another macro (such as %icon_new()).