/[drupal]/contributions/modules/taxonomy_block/taxonomy_block.settings.inc
ViewVC logotype

Contents of /contributions/modules/taxonomy_block/taxonomy_block.settings.inc

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


Revision 1.3 - (show annotations) (download) (as text)
Fri Aug 14 02:56:43 2009 UTC (3 months, 2 weeks ago) by thenicespider
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-BETA2
Changes since 1.2: +8 -1 lines
File MIME type: text/x-php
6.x-1.0-BETA2:  New: able to set maksimum term to display
1 <?php
2 // $Id: taxonomy_block.settings.inc,v 1.2 2009/06/23 17:56:53 thenicespider Exp $
3 /**
4 * @file
5 * Settings page callback file for the taxonomy_block module.
6 */
7
8 /**
9 * Menu callback;
10 */
11
12 function taxonomy_block_admin_settings() {
13 $form = array();
14 // only administrators can access this function
15
16 // Generate the form - settings applying to all patterns first
17 $form['taxonomy_block_settings'] = array(
18 '#type' => 'fieldset',
19 '#weight' => -30,
20 '#title' => t('Basic settings'),
21 '#collapsible' => TRUE,
22 '#collapsed' => FALSE
23 );
24
25 $form['taxonomy_block_settings']['taxonomy_block_settings_vid'] = array(
26 '#type' => 'textfield',
27 '#title' => t("Vocabulary ID"),
28 '#default_value' => variable_get('taxonomy_block_settings_vid', 1),
29 '#description' => t("Enter Vocabulary ID for used by taxonomy block.")
30 );
31
32 $form['taxonomy_block_settings']['taxonomy_block_settings_max_term'] = array(
33 '#type' => 'textfield',
34 '#title' => t("Maximum number of term to display"),
35 '#default_value' => variable_get('taxonomy_block_settings_max_term', 0),
36 '#description' => t("Enter 0 to display all terms.")
37 );
38
39 $form['taxonomy_block_settings']['taxonomy_block_settings_node_count'] = array(
40 '#type' => 'checkbox',
41 '#title' => t('Show node count'),
42 '#default_value' => variable_get('taxonomy_block_settings_node_count', 0)
43 );
44
45 return system_settings_form($form);
46 }

  ViewVC Help
Powered by ViewVC 1.1.2