Brimbox Logo Brimbox Version 2.3.4 Released

Constants >>

Constants in Brimbox are defined in the bb_constants.php file in the bb-config folder. Constants are usually initialized using $main->on_constant and $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.

define('BB_PRETTY_SLUGS', 1);

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.

define('BB_RETURN_ROWS', 4);

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.

define('BB_PAGINATION', 5);

BB_PAGINATION defines the number of page links in the pagination for the standard modules.

define('BB_NUMBER_LAYOUTS', 12);

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.

define('BB_STANDARD_LENGTH', 255);

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.

define('BB_NOTE_LENGTH', 65536);

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.

define('BB_ARCHIVE_INTERWORKING', 'OFF');
ON/OFF

BB_ARCHIVE_INTERWORKING enables a check box which allows standard “Search” and “Lookup” modules to return archived records.

define('BB_DEFAULT_USERROLE_ASSIGN', '');
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”.

define('BB_MULTISELECT_DELIMITER', ',');
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.

define('BB_INPUT_INSERT_LOG', 'OFF');
ON/OFF

BB_INPUT_INSERT_LOG turns on logging for record inserts with standard messages.

define('BB_INPUT_UPDATE_LOG', 'OFF');
ON/OFF

BB_INPUT_UPDATE_LOG turns on logging for record updates with standard messages.

define('BB_DELETE_LOG', 'OFF');
ON/OFF

BB_DELETE_LOG turns on logging for record deletes with standard messages.

define('BB_ARCHIVE_LOG', 'OFF');
ON/OFF

BB_ARCHIVE_LOG turns on logging for record archiving with standard messages.

define('BB_INPUT_ARCHIVE_POST', 'OFF');
ON/OFF

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.

define('BB_INPUT_SECURE_POST', 'OFF');
ON/OFF

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.

define('BB_FILE_DOWNLOAD_PERMISSIONS', '');
Default: ‘3_bb_brimbox,4_bb_brimbox,5_bb_brimbox’

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.

define('BB_DOCUMENT_DOWNLOAD_PERMISSIONS', '');
Default: ‘3_bb_brimbox,4_bb_brimbox,5_bb_brimbox’

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.

define('BB_FULLTEXT_STATE', 'begin');

  • 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.

Updated: 2017-09-10