| 1 |
|
<?php |
| 2 |
|
|
| 3 |
|
function last_node_admin_settings() { |
| 4 |
|
$nodes_types = node_get_types(); |
| 5 |
|
|
| 6 |
|
$form['last_node_labels'] = array( |
| 7 |
|
'#type' => 'fieldset', |
| 8 |
|
'#collapsible' => TRUE, |
| 9 |
|
'#collapsed' => TRUE, |
| 10 |
|
'#title' => t('Labels for your nodes')); |
| 11 |
|
|
| 12 |
|
$form['last_node_images'] = array( |
| 13 |
|
'#type' => 'fieldset', |
| 14 |
|
'#collapsible' => TRUE, |
| 15 |
|
'#collapsed' => TRUE, |
| 16 |
|
'#title' => t('Images for your nodes (Relative path)') ); |
| 17 |
|
foreach ($nodes_types as $v => $k) { |
| 18 |
|
$nodes[$v] = $v; |
| 19 |
|
$form['last_node_labels']["last_node_labelnode_$v"] = array( |
| 20 |
|
'#type' => 'textfield', |
| 21 |
|
'#title' => t('Label for ') . $v, |
| 22 |
|
'#default_value' => variable_get('last_node_labelnode_'. $v,$v), |
| 23 |
|
'#size' => 32,'#maxlength' => 128, |
| 24 |
|
'#description' => t('It\'s the name for <em>') . $v . t('</em> node type that display in your last_node page')); |
| 25 |
|
|
| 26 |
|
$form['last_node_images']["last_node_imagenode_$v"] = array( |
| 27 |
|
'#type' => 'textfield', |
| 28 |
|
'#title' => t('Image for ') . $v .' <em>(Relative path)</em>', |
| 29 |
|
'#default_value' => variable_get('last_node_imagenode_'. $v, ''), |
| 30 |
|
'#size' => 32,'#maxlength' => 128, |
| 31 |
|
'#description' => t('It\'s the Image associated for <em>') . $v . t('</em> node type that display in your last_node page')); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
$form['last_node_choice'] = array( |
| 35 |
|
'#type' => 'fieldset', |
| 36 |
|
'#collapsible' => TRUE, |
| 37 |
|
'#collapsed' => TRUE, |
| 38 |
|
'#title' => t('Choice your nodes')); |
| 39 |
|
|
| 40 |
|
$form['last_node_choice']['last_node_check'] = array( |
| 41 |
|
'#type' => 'checkboxes', |
| 42 |
|
'#title' => t('Nodes included when you point at <em>last_node/</em> node and in <em>Last 10</em> block.<br />Here active too your block of last 10 nodes for type.'), |
| 43 |
|
'#default_value' => variable_get('last_node_check', array()), |
| 44 |
|
'#options' => $nodes, '#required' => TRUE); |
| 45 |
|
|
| 46 |
|
$form['last_node_other'] = array( |
| 47 |
|
'#type' => 'fieldset', |
| 48 |
|
'#collapsible' => TRUE, |
| 49 |
|
'#collapsed' => TRUE, |
| 50 |
|
'#title' => t('Other Settings')); |
| 51 |
|
|
| 52 |
|
$form['last_node_other']['last_node_blockhide'] = array( |
| 53 |
|
'#type' => 'checkbox', |
| 54 |
|
'#title' => t('<em>Auto-Hide</em> your block Last 10 for type, these will show only for node of same type display'), |
| 55 |
|
'#default_value' => variable_get('last_node_blockhide', FALSE)); |
| 56 |
|
|
| 57 |
|
return system_settings_form($form); |
| 58 |
|
|
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
?> |