Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By pobster on
function taxonomy_defaults_settings() {
drupal_set_title("Default Terms");
$types = node_list();
foreach ((array)$types as $type) {
$table[$type][] = array('data'=>"<strong>".node_invoke($type, 'node_name')."</strong>", 'style'=>'padding:5px;border:2px solid #CCC');
unset($output);
unset($subtable);
$typevocabs = taxonomy_get_vocabularies($type);
foreach ((array)taxonomy_get_vocabularies() as $vid => $vocab) {
// is this vocab an active vocab for this node-type?
$activevocab = (key_exists($vid, $typevocabs)) ? TRUE : FALSE ;
$subtable[$vocab->vid][1] = form_checkbox($activevocab ? 'active ' : '<i>active</i> ', 'taxdef_'.$type.'_'.$vocab->vid.'_active', 1, variable_get('taxdef_'.$type.'_'.$vocab->vid.'_active', FALSE));
$subtable[$vocab->vid][2] = taxonomy_form($vocab->vid, variable_get('taxdef_'.$type.'_'.$vocab->vid, 0), NULL, 'taxdef_'.$type.'_'.$vocab->vid);
}
$output .= theme('table', '', $subtable);
$table[$type][] = array('data'=>$output, 'style'=>'padding:5px;border:2px solid #CCC');
}
$output = theme('table', array('content type', 'vocabularies and terms'), $table);
return $output;
}
I can't believe that I can't upgrade this myself... No matter what I do to it I get one error or another. PLEASE HELP?!!!
I'm starting to think that maybe taxonomy doesn't work like it did in 4.6?
Thanks
Pobster
Comments
I tried
I tried this:
Which I believe worked... Sort of... But I'm getting errors elsewhere in the code which prevents it from displaying. And anyways... It's messy and probably won't work doing it that way... I'm stumped?
Pobster