Subsections


A..20 Macros

The Macros Admin Tool is where you define the macros (4.9) that users will have access to. To use this Admin Tool, you must have the edit_macros perm (A.12.12) active for your group.

There are two ways of editing macros; in the single macro screen, one macro at a time is fetched and displayed, edited, then saved. In the category screen, all macros in a category are fetched and displayed, any number of them are edited, then saved all at once.

The single macro screen can be reached by either clicking the ``Add New'' link at the top of the category list or by clicking a macro name from the category screen. The category screen can be reached by clicking the name of the category in the category list from any of the screens in the Macros Admin Tool.

A..20.1 The Single Macro Screen

When you first load the Macros Admin Tool, or when you are editing a single macro, this is the form you will see. The single macro form allows you to edit any part of a macro, including its category and name.

Just below the category list are two form buttons, Save and Get. These buttons are duplicated at the bottom of the single variable form.

Directly underneath the top Save and Get buttons is a checkbox marked ``delete''. If a macro has been selected from the ``Select Macro'' list, checking this box then saving the macro will delete it from the database. It doesn't have to have been loaded first.

The fields are:

Select Macro
Contains a list of every macro contained in the database. To load a macro, you would select its name here, then press the Get button above to fetch the macro's data. When adding a new macro, this must be set to ``Add New Macro''; when saving an existing macro, this must match the macro name in the ``Name'' field, below.
Select Categories
Contains a list of all existing categories. When a macro has been loaded, that macro's categories are hilighted. When saving a macro, at least one of the categories should be selected (or a new category named in the ``New Category'' field below). If a macro has no selected category, it will only be visible in a list of all macros, making it rather hard to find later.
Name
Contains the name of the macro, as it is used by your users. New macros may be named anything as long as it doesn't conflict with any other macro names.
New Category
Used only when a new macro doesn't fit in any of the existing categories, or you want to add an existing macro to a newly created category. A category only exists when a macro is filed in it; by filing a macro in a new category, that category is automatically created. (Likewise, when the last macro in a category is removed, the category automatically disappears.)
Value
Contains the value of the macro. It can be anything that Scoop accepts in its page output, including box and block calls, and HTML that is not otherwise permitted to users. This is the field most often changed, and is also the only field that can be changed when in the category screen.
Description
Contains the documentation for that particular macro.

A..20.2 The Category Screen

When you click on one of the category links (except for the ``Add New'' link) in the category list, this is the screen you will see. The category form allows you to edit the value only of any number of macros at the same time.

At the top and bottom of the list of the category form are the Save and Get buttons. In this case, the Get button acts as a reset button, undoing any changes you had made (as long as you didn't save them). The save button saves the macros that you have changed, and leaves the other ones alone.

The category form itself is a series of repeating rows, one for each macro. The first column contains the name of the macro, in the form of a link to the single macro edit form described above. The second column contains a control for the macro's value. The third column contains the description of the macro.

The macros are sorted alphabetically by name.

Any number of macros in the category form may be changed at once, and saved in one operation. The categories also make macros much easier to find, especially when you can't remember the exact macro name.

Macros cannot be created or deleted from the category screen.


janra
2004-06-16