You are here

function _messaging_install_create_filter in Messaging 6

Same name and namespace in other branches
  1. 5 messaging.install \_messaging_install_create_filter()
  2. 6.2 messaging.install \_messaging_install_create_filter()
  3. 6.3 messaging.install \_messaging_install_create_filter()

Create a default plain text filter, just to have some reasonable default to get started

2 calls to _messaging_install_create_filter()
messaging_install in ./messaging.install
Implementation of hook_install().
messaging_update_6001 in ./messaging.install
Updates for Drupal 6 version

File

./messaging.install, line 75

Code

function _messaging_install_create_filter() {

  // Create default filter, plain text
  db_query("INSERT INTO {filter_formats} (name, cache) VALUES('%s', 0)", t('Messaging plain text'));
  $format = db_last_insert_id('filter_formats', 'format');
  db_query("INSERT INTO {filters} (format, module, delta, weight) VALUES(%d, 'messaging', 1, 0)", $format);
  variable_set('messaging_default_filter', $format);
  drupal_set_message(t("A new Input format has been created: %name", array(
    '%name' => t('Messaging plain text'),
  )));
}