/[drupal]/contributions/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.admin.inc
ViewVC logotype

Diff of /contributions/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Mon Jan 12 02:19:26 2009 UTC revision 1.1.2.1, Fri Mar 13 16:46:03 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: $  // $Id: taxonomy_breadcrumb.admin.inc,v 1.1 2009/01/12 02:19:26 mgn Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 29  function taxonomy_breadcrumb_admin_setti Line 29  function taxonomy_breadcrumb_admin_setti
29      '#default_value'  => variable_get('taxonomy_breadcrumb_show_current_term', TRUE),      '#default_value'  => variable_get('taxonomy_breadcrumb_show_current_term', TRUE),
30      '#description'    => t('When enabled, the lightest term associated with node is shown as the last breadcrumb in the breadcrumb trail.  When disabled, the only terms shown in the breadcrumb trail are parent terms (if any parents exist).  The recommended setting is enabled.'),      '#description'    => t('When enabled, the lightest term associated with node is shown as the last breadcrumb in the breadcrumb trail.  When disabled, the only terms shown in the breadcrumb trail are parent terms (if any parents exist).  The recommended setting is enabled.'),
31    );    );
32    
33      $form['settings']['taxonomy_breadcrumb_include_node_title'] = array(
34        '#type'           => 'checkbox',
35        '#title'          => t('Show current node title in breadcrumb trail?'),
36        '#default_value'  => variable_get('taxonomy_breadcrumb_include_node_title', FALSE),
37        '#description'    => t('When enabled and when viewing a node, the node\'s title will be shown as the last breadcrumb in the breadcrumb trail.'),
38        '#weight'         => 30,
39      );
40    
41    $form['advanced'] = array(    $form['advanced'] = array(
42      '#type'           => 'fieldset',      '#type'           => 'fieldset',
# Line 46  function taxonomy_breadcrumb_admin_setti Line 54  function taxonomy_breadcrumb_admin_setti
54      '#weight'         => 10,      '#weight'         => 10,
55    );    );
56    
57    // Get all of the node types enabled.    $tb_types = (array) variable_get('taxonomy_breadcrumb_node_types', TAXONOMY_BREADCRUMB_NODE_TYPES_DEFAULT);
58    $node_bases = array();    $default = array();
59    $node_types = node_get_types();    foreach ($tb_types as $index => $value) {
60    foreach ($node_types as $node_type) {      if ($value) {
61      $node_bases[] = $node_type->type;        $default[] = $index;
62        }
63    }    }
64    
65    $form['advanced']['taxonomy_breadcrumb_node_types'] = array(    $form['advanced']['taxonomy_breadcrumb_node_types'] = array(
66      '#type'           => 'textfield',      '#type'           => 'checkboxes',
67        '#multiple'       => TRUE,
68      '#title'          => t('Node types to include or exclude'),      '#title'          => t('Node types to include or exclude'),
69      '#default_value'  => variable_get('taxonomy_breadcrumb_node_types', TAXONOMY_BREADCRUMB_NODE_TYPES_DEFAULT),      '#default_value'  => $default,
70      '#description'    => t('Enter a list of node types to include or exclude applying taxonomy based breadcrumbs to.  Separate multiple values with spaces. <p>Node types currently enabled:') .'<ul><li>'. implode($node_bases, '</li><li>') .'</li></ul></p>',      '#options'        => array_map('check_plain', node_get_types('names')),
71        '#description'    => t('A list of node types to include or exclude applying taxonomy based breadcrumbs to.'),
72      '#weight'         => 20,      '#weight'         => 20,
73    );    );
74    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2