| 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 |
}
|