fblikebutton.install in Facebook Like Button 6.2
Same filename and directory in other branches
Install, update, and uninstall functions for the Facebook Like Button module.
File
fblikebutton.installView source
<?php
/**
 * @file
 * Install, update, and uninstall functions for the Facebook Like Button module.
 */
// $Id$
/**
 * Implementation of hook_install().
 */
function fblikebutton_install() {
  //  There really is no "schema" to install.
}
/**
 * Implementation of hook_uninstall().
 */
function fblikebutton_uninstall() {
  variable_del('fblikebutton_full_node_display');
  variable_del('fblikebutton_bl_iframe_css');
  variable_del('fblikebutton_node_types');
  variable_del('fblikebutton_show_faces');
  variable_del('fblikebutton_layout');
  variable_del('fblikebutton_color_scheme');
  variable_del('fblikebutton_iframe_height');
  variable_del('fblikebutton_iframe_width');
  variable_del('fblikebutton_iframe_css');
  variable_del('fblikebutton_language');
  variable_del('fblikebutton_displaysend');
  variable_del('fblikebutton_font');
  variable_del('fblikebutton_weight');
  variable_del('fblikebutton_teaser_display');
  variable_del('fblikebutton_xfbml');
  variable_del('fblikebutton_appid');
  variable_del('fblikebutton_bl_layout');
  variable_del('fblikebutton_bl_layout');
  variable_del('fblikebutton_bl_show_faces');
  variable_del('fblikebutton_bl_action');
  variable_del('fblikebutton_bl_font');
  variable_del('fblikebutton_bl_color_scheme');
  variable_del('fblikebutton_bl_iframe_width');
  variable_del('fblikebutton_bl_iframe_height');
  variable_del('fblikebutton_bl_iframe_css');
  variable_del('fblikebutton_bl_language');
}
/**
 * Change the stored variables for the 'show faces' option to a simple boolean.
 */
function fblikebutton_update_6200() {
  // Update the variables for the dynamic fblikebutton.
  $faces = variable_get('fblikebutton_show_faces', '');
  if ($faces == 'show') {
    variable_set('fblikebutton_show_faces', TRUE);
  }
  else {
    if ($faces == 'hide') {
      variable_set('fblikebutton_show_faces', FALSE);
    }
  }
  // Update the variables for the static fblikebutton.
  $faces = variable_get('fblikebutton_bl_show_faces', '');
  if ($faces == 'show') {
    variable_set('fblikebutton_bl_show_faces', TRUE);
  }
  else {
    if ($faces == 'hide') {
      variable_set('fblikebutton_bl_show_faces', FALSE);
    }
  }
  return array();
}Functions
| 
            Name | 
                  Description | 
|---|---|
| fblikebutton_install | Implementation of hook_install(). | 
| fblikebutton_uninstall | Implementation of hook_uninstall(). | 
| fblikebutton_update_6200 | Change the stored variables for the 'show faces' option to a simple boolean. |