Constants in Brimbox are defined in the
bb_constants.php file in the
bb-config folder. Constants are usually initialized using
$main->get_constant. Note that if a constant value is an empty string and
$main->get_constant is used to initialize the default value in the
$main->get_constant invocation will be assigned.
BB_PRETTY_SLUGS defines the slug state. There are three different types of page slugs currently defined. They are:
- 0 – Use the raw module name as a slug. This will be unique and never cause a conflict.
- 1 – The module name is truncated to the first underscore and any remaining underscores are converted to hyphens.
- 2 – The raw module name is used with any underscores converted to hyphens.
BB_RETURN_ROWS defines the number of rows to return during pagination for standard modules. Generally setting this to somewhere around or between 10 and 50 would be normal for a web page return.
BB_PAGINATION defines the number of page links in the pagination for the standard modules.
BB_NUMBER_LAYOUTS sets the number of layouts available on the “Set Layout Names” admin module. The maximum number of layouts is 26 corresponding to A-Z. Certain things will not work if there are more layouts than 26.
BB_STANDARD_LENGTH sets maximum standard field length on the input tab for standard input fields, not note fields or dropdown fields. This is enforced in HTML on the input tag.
BB_NOTE_LENGTH sets maximum note field length on the input tab for standard note fields. This is enforced in HTML on the note textarea.
BB_ARCHIVE_INTERWORKING enables a check box which allows standard “Search” and “Lookup” modules to return archived records.
Default: 0_bb_brimbox / Locked
BB_DEFAULT_USERROLE_ASSIGN defines the standard userrole that will be selected when assigning new users. By default if blank default userrole is “Locked”. This eases assigning of common userroles and prevents accidental assigning of high permissions like “Admin”.
Default is comma
BB_MULTISELECT_DELIMITER sets the delimiter for multiselect dropdowns and is used in the “Input” and “Manage Dropdowns” routines. Multiselect dropdowns are saved in the database as a string delimited by the multiselect delimiter, by default commas.
BB_INPUT_INSERT_LOG turns on logging for record inserts with standard messages.
BB_INPUT_UPDATE_LOG turns on logging for record updates with standard messages.
BB_DELETE_LOG turns on logging for record deletes with standard messages.
BB_ARCHIVE_LOG turns on logging for record archiving with standard messages.
BB_INPUT_ARCHIVE_POST allows posting of the archive integer flag so a secure form object like a dropdown or radio named
archive can be hooked to the input form. Otherwise archive is set by parent or recursively through the standard archive link.
BB_INPUT_SECURE_POST allows posting of the secure integer flag so a secure form object like a dropdown or radio named
secure can be hooked to the input form. Otherwise secure is set by parent or recursively through the standard secure link.
BB_FILE_DOWNLOAD_PERMISSIONS allows for file download permissions to be set directly. Since files stored in the data system are available from a download/stream PHP file without directly specifying permissions it might be possible to download against database security policy if this constant is not set.
BB_DOCUMENT_DOWNLOAD_PERMISSIONS allows for document download permissions to be set directly. Since documents in the document store are available from a download/stream PHP file without directly specifying permissions it might be possible to download against database security policy if this constant is not set.
- word – fulltext searches on full word only
- begin – fulltext searches on first part or whole word.
BB_FULLTEXT_STATE allows for wildcard searching like searching for “string” with “str*”. If this constant is set to “begin” an asterisk can be used as a ending wildcard. Otherwise if set to “word” the full word must be used.