summaryrefslogtreecommitdiffstats
path: root/addthis.install
blob: b58aeac60e13a539efba1a637abe0e3248587b3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php

/**
 * @file
 * Install, update and uninstall functions for the AddThis module.
 */

// We need some constant values from the AddThis class.
include_once('classes/AddThis.php');

/**
 * Implements hook_field_schema().
 */
function addthis_field_schema($field) {
  $schema = array();
  if ($field['type'] == AddThis::FIELD_TYPE) {
    $columns = array(
      'value' => array(
        'type' => 'varchar',
        'length' => $field['settings']['max_length'],
        'not null' => FALSE,
      ),
    );
    $schema = array(
      'columns' => $columns,
      'indexes' => array(),
      'foreign keys' => array(),
    );
  }
  return $schema;
}

/**
 * Implements hook_uninstall().
 */
function addthis_uninstall() {
  variable_del(AddThis::ADDRESSBOOK_ENABLED_KEY);
  variable_del(AddThis::BLOCK_WIDGET_TYPE_KEY);
  variable_del(AddThis::BOOKMARK_URL_KEY);
  variable_del(AddThis::CLICKBACK_TRACKING_ENABLED_KEY);
  variable_del(AddThis::CLICK_TO_OPEN_COMPACT_MENU_ENABLED_KEY);
  variable_del(AddThis::CO_BRAND_KEY);
  variable_del(AddThis::COMPLIANT_508_KEY);
  variable_del(AddThis::CUSTOM_CONFIGURATION_CODE_ENABLED_KEY);
  variable_del(AddThis::CUSTOM_CONFIGURATION_CODE_KEY);
  variable_del(AddThis::ENABLED_SERVICES_KEY);
  variable_del(AddThis::OPEN_WINDOWS_ENABLED_KEY);
  variable_del(AddThis::PROFILE_ID_KEY);
  variable_del(AddThis::SERVICES_CSS_URL_KEY);
  variable_del(AddThis::SERVICES_JSON_URL_KEY);
  variable_del(AddThis::STANDARD_CSS_ENABLED_KEY);
  variable_del(AddThis::UI_DELAY_KEY);
  variable_del(AddThis::UI_HEADER_BACKGROUND_COLOR_KEY);
  variable_del(AddThis::UI_HEADER_COLOR_KEY);
  variable_del(AddThis::WIDGET_JS_URL_KEY);
}