You are here

arrange_fields.install in Arrange Fields 6

Same filename and directory in other branches
  1. 7 arrange_fields.install

File

arrange_fields.install
View source
<?php

// $Id$

/**
 * Implementation of hook_install.  All we really need from this is to make sure
 * that the module's weight is higher than CCK's, or else all kinds of problems
 * will happen when we go to do hook_form_alter.
 *
 */
function arrange_fields_install() {
  db_query("UPDATE {system} SET weight = 500 WHERE name = 'arrange_fields'");
}

/**
 * Implementation of hook_enable.  Since clearing the cache seems to correct
 * so many bugs with this module, I am going to do it on enable.  This hopefully
 * will cut down on the initial bugs some users experience.
 *
 */
function arrange_fields_enable() {
  drupal_set_message("Arrange Fields: Cache cleared during installation.");
  cache_clear_all();
  drupal_set_message(t("If you are installing Arrange Fields for the first time,\n                        you may need to clear your site's cache again to ensure\n                        that the menu system is updated.  Please visit this\n                        page and select Clear Cached Data at the bottom\n                        of the screen: ") . l("admin/settings/performance", "admin/settings/performance"));
}

/**
 * The main thing we want to do here is up the weight to a higher number.  Before
 * now, the weight was set to 50.  But, in order for this module to work with vertical
 * tabs (whose weight is 300), the weight needs to be higher.
 *
 */
function arrange_fields_update_6100() {
  db_query("UPDATE {system} SET weight = 500 WHERE name = 'arrange_fields'");
}

Functions

Namesort descending Description
arrange_fields_enable Implementation of hook_enable. Since clearing the cache seems to correct so many bugs with this module, I am going to do it on enable. This hopefully will cut down on the initial bugs some users experience.
arrange_fields_install Implementation of hook_install. All we really need from this is to make sure that the module's weight is higher than CCK's, or else all kinds of problems will happen when we go to do hook_form_alter.
arrange_fields_update_6100 The main thing we want to do here is up the weight to a higher number. Before now, the weight was set to 50. But, in order for this module to work with vertical tabs (whose weight is 300), the weight needs to be higher.