You are here

nodeformsettings.install in Node and Comments Form Settings 6.3

File

nodeformsettings.install
View source
<?php

/**
 * Implementation of hook_install().
 * Display a welcome message
 */
function nodeformsettings_install() {
  db_query("UPDATE {system} SET weight = 1 WHERE name = 'nodeformsettings'");
  drupal_set_message(t('Node Form Settings is now installed. Customize your content types at <a href="@contenttypes">the content types settings page</a>.', array(
    '@contenttypes' => url('admin/content/types'),
  )));
}

/**
 * Implementation of hook_uninstall().
 * Remove the variables this module created.
 */
function nodeformsettings_uninstall() {

  // remove all variables we created
  $variables = db_query("SELECT name FROM {variable} WHERE name LIKE 'nodeformsettings%%'");
  while ($variable = db_fetch_object($variables)) {
    variable_del($variable->name);
  }
  update_sql("DELETE FROM {system} WHERE name like '%nodeformsettings'");
}

/**
 * Set propper weight
 */
function nodeformsettings_update_6200() {
  $ret = array();
  db_query("UPDATE {system} SET weight = 1 WHERE name = 'nodeformsettings'");
  return $ret;
}

Functions

Namesort descending Description
nodeformsettings_install Implementation of hook_install(). Display a welcome message
nodeformsettings_uninstall Implementation of hook_uninstall(). Remove the variables this module created.
nodeformsettings_update_6200 Set propper weight