function forum_install

Same name in other branches
  1. 9 core/modules/forum/forum.install \forum_install()
  2. 8.9.x core/modules/forum/forum.install \forum_install()
  3. 10 core/modules/forum/forum.install \forum_install()
  4. 11.x core/modules/forum/forum.install \forum_install()

Implements hook_install().

File

modules/forum/forum.install, line 11

Code

function forum_install() {
    // Set the weight of the forum.module to 1 so it is loaded after the taxonomy.module.
    db_update('system')->fields(array(
        'weight' => 1,
    ))
        ->condition('name', 'forum')
        ->execute();
    // Forum topics are published by default, but do not have any other default
    // options set (for example, they are not promoted to the front page).
    variable_set('node_options_forum', array(
        'status',
    ));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.