Subsections


A..7 Blocks

The Blocks Admin Tool is where you change the static content and layout of the site. This includes most messages, such as the text shown when somebody signs up for a new account, and most layout, such as how a page, story, or comment is formatted. To use this Admin Tool, you must have the edit_blocks perm (A.12.8) active for your group.

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

The single block screen can be reached by either clicking the ``Add New'' link at the top of the category list or by clicking a block 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 Blocks Admin Tool.

Above the category list, a list of existing themes is shown. Clicking on the theme name will cause the categories and select block fields to only display blocks from that theme. The link to the theme overview allows you to select which themes to display, then arranges block names in a table so you can see at a glance which themes contain which blocks. For more information on themes, see section 4.15.2.

A..7.1 The Single Block Screen

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

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

Directly underneath the top Save and Get buttons is a checkbox marked ``Check HTML''. This will run your block through Scoop's internal HTML validator and report any errors (errors will cause the block to not be saved). Below that is a checkbox marked ``delete''. If a block has been selected from the ``Select Block'' list, checking this box then saving the block will delete it from the database. It doesn't have to have been loaded first.

Select Block
Contains a list of every block contained in the database. To load a block, you would select its name here, then press the Get button above to fetch the block's data. When adding a new block (including copying an existing block to a different theme), this must be set to ``Add New Block''; when saving an existing block, this must match the block name in the ``Name'' field, below.
Select Categories
Contains a list of all existing categories. When a block has been loaded, that block's categories are hilighted. When saving a block, at least one of the categories should be selected (or a new category named in the ``New Category'' field below). If a block has no selected category, it will only be visible in a list of all blocks, making it rather hard to find later.
Name
Contains the name of the block, as it is used in the code. Changing the name of an existing block is discouraged, as many blocks are called by name from the code. New blocks may be named anything as long as it doesn't conflict with any other block names.
Theme
Contains the name of the theme the block is a part of. If this field is left blank, whichever theme you are currently working in is used. New themes can be created by saving a new block with a theme name that doesn't exist. Likewise, when the last block in a theme is deleted, the theme automatically disappears.
New Category
Used only when a new block doesn't fit in any of the existing categories, or you want to add an existing block to a newly created category. A category only exists when a block is filed in it; by filing a block in a new category, that category is automatically created. Likewise, when the last block in a category is deleted, the category automatically disappears.
Value
Contains the value of the block. It can be anything, keeping in mind of course what its intended use is. This is the field most often changed, and is also the only field that can be changed when in the category screen.
Description
field contains the documentation for that particular variable. If you create a new variable, please describe it well, using the conventions described in section A.7.3 as much as possible.

A..7.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 blocks 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 blocks that you have changed, and leaves the other ones alone.

The category form itself is a series of repeating rows, one for each block. The first column contains the name of the block, in the form of a link to the single block edit form described above, and the description of the block. The second column contains a textarea for the block's value, roughly 60*20 in size.

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

Blocks cannot be created or deleted from the category screen.


A..7.3 Block Description Format

The purpose of the block descriptions is to inform the admin as to what a particular block is for, where it is typically used, what special values, if any, it uses, and warnings about any pitfalls involved in changing the block's value.

The descriptions then all follow the same format, to ensure no important details are forgotten. If you create a new block, please use the same format for the description to help other Scoop admins use it effectively.

The description should address the following points in order and as completely as possible.


janra
2004-03-26