You are here

function taxonomy_breadcrumb_install in Taxonomy Breadcrumb 5

Same name and namespace in other branches
  1. 8 taxonomy_breadcrumb.install \taxonomy_breadcrumb_install()
  2. 6 taxonomy_breadcrumb.install \taxonomy_breadcrumb_install()
  3. 7 taxonomy_breadcrumb.install \taxonomy_breadcrumb_install()

Implementation of hook_install().

File

./taxonomy_breadcrumb.install, line 12
.install file for the taxonomy_breadcrumb module.

Code

function taxonomy_breadcrumb_install() {
  drupal_set_message('Installing taxonomy_breadcrumb.');
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {taxonomy_breadcrumb_vocabulary} (\n                vid int(10) unsigned NOT NULL default '0',\n                path varchar(128) NOT NULL default '',\n                PRIMARY KEY (vid)\n                ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      db_query("CREATE TABLE {taxonomy_breadcrumb_term} (\n                tid int(10) unsigned NOT NULL default '0',\n                path varchar(128) NOT NULL default '',\n                PRIMARY KEY (tid)\n                ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {taxonomy_breadcrumb_vocabulary} (\n                vid integer NOT NULL default '0',\n                path varchar(128) NOT NULL default '',\n                PRIMARY KEY (vid)\n                );");
      db_query("CREATE TABLE {taxonomy_breadcrumb_term} (\n                tid integer NOT NULL default '0',\n                path varchar(128) NOT NULL default '',\n                PRIMARY KEY (tid)\n                );");
      break;
  }
  variable_set('taxonomy_breadcrumb_home', t('Home'));
  drupal_set_message('Taxonomy breadcrumb: Taxonomy based breadcrumbs should now appear on node pages and taxonomy/term pages.  For the most common applications this module will work "out of the box" and no further configuration is necessary.  If customization is desired settings can be changed on the ' . l('administration page', 'admin/settings/taxonomy-breadcrumb') . '.');
}