You are here

brb.install in Browser Bouncer (brb) 7

Installation file for BrB module.

File

brb.install
View source
<?php

/**
 * @file
 * Installation file for BrB module.
 */

/**
* Implementation of hook_install()
*/
function brb_install() {

  // Insert IE conditional
  variable_set('brb_ie_conditional', BRB_IE_CONDITIONAL_DEFAULT);

  // Insert overlay option
  variable_set('brb_overlay', TRUE);

  // Insert browsers list
  variable_set('brb_browsers', array(
    1 => (object) array(
      'name' => 'Firefox',
      'url' => 'http://www.mozilla.com/firefox/',
      'exclude' => FALSE,
      'weight' => 1,
    ),
    2 => (object) array(
      'name' => 'Safari',
      'url' => 'http://www.apple.com/safari/download/',
      'exclude' => FALSE,
      'weight' => 2,
    ),
    3 => (object) array(
      'name' => 'Chrome',
      'url' => 'http://www.google.com/chrome/',
      'exclude' => FALSE,
      'weight' => 3,
    ),
    4 => (object) array(
      'name' => 'Opera',
      'url' => 'http://www.opera.com/download/',
      'exclude' => FALSE,
      'weight' => 4,
    ),
    5 => (object) array(
      'name' => 'IE',
      'url' => 'http://www.microsoft.com/windows/internet-explorer/default.aspx',
      'exclude' => FALSE,
      'weight' => 5,
    ),
  ));

  // Insert title
  variable_set('brb_title', BRB_TITLE);

  // Insert explanation message in table variables
  variable_set('brb_body', BRB_BODY_DEFAULT);
}

/**
* Implementation of kook_uninstall()
*/
function brb_uninstall() {

  // Remove variables
  variable_del('brb_ie_conditional');
  variable_del('brb_overlay');
  variable_del('brb_browsers');
  variable_del('brb_title');
  variable_del('brb_body');
}

Functions

Namesort descending Description
brb_install Implementation of hook_install()
brb_uninstall Implementation of kook_uninstall()