| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: indexpage.admin.inc,v 1.1.2.1 2009/05/21 15:39:49 nancyw Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 12 |
*/ |
*/ |
| 13 |
function indexpage_admin_settings() { |
function indexpage_admin_settings() { |
| 14 |
drupal_add_css(drupal_get_path('module', 'indexpage') .'/indexpage.css'); |
drupal_add_css(drupal_get_path('module', 'indexpage') .'/indexpage.css'); |
| 15 |
|
$yesno = array(1 => t('Yes'), 0 => t('No')); |
| 16 |
|
|
| 17 |
$form['general'] = array( |
$form['general'] = array( |
| 18 |
'#type' => 'fieldset', |
'#type' => 'fieldset', |
| 39 |
); |
); |
| 40 |
|
|
| 41 |
$form['general']['indexpage_suppress_unused'] = array( |
$form['general']['indexpage_suppress_unused'] = array( |
| 42 |
'#type' => 'checkbox', |
'#type' => 'radios', |
| 43 |
|
'#options' => $yesno, |
| 44 |
|
'#prefix' => '<div class="indexpage-radios">', |
| 45 |
|
'#suffix' => '</div>', |
| 46 |
'#title' => t('Suppress unused taxonomy terms'), |
'#title' => t('Suppress unused taxonomy terms'), |
| 47 |
'#default_value' => variable_get('indexpage_suppress_unused', FALSE), |
'#default_value' => variable_get('indexpage_suppress_unused', FALSE), |
| 48 |
'#description' => t('If this option is selected, terms with no associated nodes will not be shown.'), |
'#description' => t('If this option is selected, terms with no associated nodes will not be shown.'), |
| 49 |
); |
); |
| 50 |
|
|
| 51 |
$form['general']['indexpage_teaser_tooltip'] = array( |
$form['general']['indexpage_teaser_tooltip'] = array( |
| 52 |
'#type' => 'checkbox', |
'#type' => 'radios', |
| 53 |
|
'#options' => $yesno, |
| 54 |
|
'#prefix' => '<div class="indexpage-radios">', |
| 55 |
|
'#suffix' => '</div>', |
| 56 |
'#title' => t("Use the node's teaser as the link title"), |
'#title' => t("Use the node's teaser as the link title"), |
| 57 |
'#default_value' => variable_get('indexpage_teaser_tooltip', TRUE), |
'#default_value' => variable_get('indexpage_teaser_tooltip', TRUE), |
| 58 |
'#description' => t('If this option is selected, the teaser for the node will be used for the link title (tooltip).'), |
'#description' => t('If this option is selected, the teaser for the node will be used for the link title (tooltip).'), |
| 59 |
); |
); |
| 60 |
|
|
| 61 |
$form['general']['indexpage_show_count'] = array( |
$form['general']['indexpage_show_count'] = array( |
| 62 |
'#type' => 'checkbox', |
'#type' => 'radios', |
| 63 |
|
'#options' => $yesno, |
| 64 |
|
'#prefix' => '<div class="indexpage-radios">', |
| 65 |
|
'#suffix' => '</div>', |
| 66 |
'#title' => t('Show counts'), |
'#title' => t('Show counts'), |
| 67 |
'#default_value' => variable_get('indexpage_show_count', TRUE), |
'#default_value' => variable_get('indexpage_show_count', TRUE), |
| 68 |
'#description' => t('Shows a count of how many nodes there are and how many are used by each term.'), |
'#description' => t('Shows a count of how many nodes there are and how many are used by each term.'), |
| 69 |
); |
); |
| 70 |
|
|
| 71 |
$form['general']['indexpage_show_untagged'] = array( |
$form['general']['indexpage_show_untagged'] = array( |
| 72 |
'#type' => 'checkbox', |
'#type' => 'radios', |
| 73 |
|
'#options' => $yesno, |
| 74 |
|
'#prefix' => '<div class="indexpage-radios">', |
| 75 |
|
'#suffix' => '</div>', |
| 76 |
'#title' => t('Show untagged'), |
'#title' => t('Show untagged'), |
| 77 |
'#default_value' => variable_get('indexpage_show_untagged', TRUE), |
'#default_value' => variable_get('indexpage_show_untagged', TRUE), |
| 78 |
'#description' => t('Shows a count of how many nodes that have no taxonomy term associated.'), |
'#description' => t('Shows a count of how many nodes that have no taxonomy term associated.'), |
| 79 |
); |
); |
| 80 |
|
|
| 81 |
$form['general']['indexpage_show_description'] = array( |
$form['general']['indexpage_show_description'] = array( |
| 82 |
'#type' => 'checkbox', |
'#type' => 'radios', |
| 83 |
|
'#options' => $yesno, |
| 84 |
|
'#prefix' => '<div class="indexpage-radios">', |
| 85 |
|
'#suffix' => '</div>', |
| 86 |
'#title' => t('Show term description'), |
'#title' => t('Show term description'), |
| 87 |
'#default_value' => variable_get('indexpage_show_description', FALSE), |
'#default_value' => variable_get('indexpage_show_description', FALSE), |
| 88 |
'#description' => t('Shows the description for the term in the term list.'), |
'#description' => t('Shows the description for the term in the term list.'), |
| 110 |
'sticky' => t('Sticky'), |
'sticky' => t('Sticky'), |
| 111 |
'language' => t('Language'), |
'language' => t('Language'), |
| 112 |
); |
); |
| 113 |
|
if (module_exists('weight')) { |
| 114 |
|
$field_list['weight'] = t('Weight'); |
| 115 |
|
} |
| 116 |
|
|
| 117 |
$form['general']['indexpage_fields'] = array( |
$form['general']['indexpage_fields'] = array( |
| 118 |
'#type' => 'checkboxes', |
'#type' => 'checkboxes', |