You are here

function _enable_biblio_collection_vocabulary in Bibliography Module 7

Same name and namespace in other branches
  1. 6 biblio.install \_enable_biblio_collection_vocabulary()
  2. 7.2 biblio.install \_enable_biblio_collection_vocabulary()

File

./biblio.install, line 281

Code

function _enable_biblio_collection_vocabulary() {

  // @todo taxonomy.

  /*
    if ($vocabulary = taxonomy_vocabulary_load(variable_get('biblio_collection_vocabulary', 0))) {
    // Existing install. Add back forum node type, if the biblio
    // vocabulary still exists. Keep all other node types intact there.
    $vocabulary = (array) $vocabulary;
    $vocabulary['nodes']['biblio'] = 1;
    taxonomy_save_vocabulary($vocabulary);
    }
    else {
    // Create the forum vocabulary if it does not exist. Assign the vocabulary
    // a low weight so it will appear first in forum topic create and edit
    // forms.
    $vocabulary = array(
    'name' => 'Biblio Collections',
    'description' => 'You may organize your publications into collections by adding a collection names to this vocabulary',
    'help' => '',
    'nodes' => array('biblio' => 1),
    'hierarchy' => 0,
    'relations' => 1,
    'tags' => 0,
    'multiple' => 1,
    'required' => 0,
    'weight' => 0,
    'module' => 'biblio',
    );
    taxonomy_save_vocabulary($vocabulary);
    variable_set('biblio_collection_vocabulary', $vocabulary['vid']);
    $default_collection = array(
    'name' => t('Default'),
    'description' => t("This is the collection that all biblio entries will be a part of if no other collection is selected. Deleting this term will render all your biblio entries inaccessable. (You've been warned!)" ),
    'parent' => array(),
    'relations' => array(),
    'synonyms' => '',
    'weight' => 0,
    'vid' => variable_get('biblio_collection_vocabulary', 0),
    );
    taxonomy_save_term($default_collection);
    }
    return $vocabulary['vid'];
  */
}