You are here

function xbbcode_schema in Extensible BBCode 8.2

Same name and namespace in other branches
  1. 8 xbbcode.install \xbbcode_schema()
  2. 6 xbbcode.install \xbbcode_schema()
  3. 7 xbbcode.install \xbbcode_schema()

Implements hook_schema().

File

./xbbcode.install, line 11
Installation actions and database schema.

Code

function xbbcode_schema() {
  $schema['xbbcode_custom_tag'] = array(
    'description' => 'Custom tags created manually',
    'fields' => array(
      // Key
      'name' => array(
        'description' => 'Identifies the tag, and serves also to recognize it in text',
        'type' => 'varchar',
        'not null' => TRUE,
        'default' => '',
        'length' => 32,
      ),
      // Data
      'markup' => array(
        'description' => 'The markup that this tag should be replaced with when filtering',
        'type' => 'text',
        'size' => 'normal',
      ),
      'description' => array(
        'description' => 'Describes the use of this tag for the help text',
        'type' => 'text',
        'size' => 'normal',
      ),
      'sample' => array(
        'description' => 'A sample of how this tag is to be used',
        'type' => 'text',
        'size' => 'normal',
      ),
      // Options
      'options' => array(
        'description' => 'The settings chosen for this tag in serialized form.',
        'type' => 'text',
        'size' => 'normal',
      ),
    ),
    'primary key' => array(
      'name',
    ),
  );
  return $schema;
}