You are here

function high_contrast_install in High contrast 6

Same name and namespace in other branches
  1. 7 high_contrast.install \high_contrast_install()

Implementation of hook_install()

File

./high_contrast.install, line 7

Code

function high_contrast_install() {
  require_once "high_contrast.module";

  //adjust weight
  $max_weight = db_result(db_query_range("SELECT weight FROM {system} ORDER BY weight DESC", 0, 1));
  db_query('UPDATE {system} SET weight = %d WHERE name = "high_contrast"', $max_weight + 1);

  //set variables
  variable_set("high_contrast_switcher_widget", "links");
  variable_set("high_contrast_switcher_label", "Contrast:");
  variable_set("high_contrast_high_label", "High");
  variable_set("high_contrast_separator", "|");
  variable_set("high_contrast_normal_label", "Normal");
  variable_set("high_contrast_css_styles", _high_contrast_get_default_css_styles());
}