| 1 |
<?php |
<?php |
| 2 |
// $Id: xmlsitemap_node.module,v 1.19.2.72 2009/03/01 01:05:21 kiam Exp $ |
// $Id: xmlsitemap_node.module,v 1.19.2.73 2009/03/01 01:21:49 kiam Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 61 |
*/ |
*/ |
| 62 |
function xmlsitemap_node_form_alter(&$form, &$form_state, $form_id) { |
function xmlsitemap_node_form_alter(&$form, &$form_state, $form_id) { |
| 63 |
switch ($form_id) { |
switch ($form_id) { |
| 64 |
|
case 'user_admin_settings': |
| 65 |
|
if (!isset($form['xmlsitemap'])) { |
| 66 |
|
$form['xmlsitemap'] = array( |
| 67 |
|
'#type' => 'fieldset', |
| 68 |
|
'#title' => t('XML site map'), |
| 69 |
|
'#collapsible' => TRUE, |
| 70 |
|
); |
| 71 |
|
} |
| 72 |
|
$form['xmlsitemap']['xmlsitemap_node_posts_count'] = array( |
| 73 |
|
'#type' => 'select', |
| 74 |
|
'#title' => t('User posts threshold'), |
| 75 |
|
'#description' => t('The number of posts a user must author before his posts are added to the site map.') .' '. t('This is the default value used for the users for which the post threshold has not been set.'), |
| 76 |
|
'#default_value' => variable_get('xmlsitemap_node_posts_count', 100), |
| 77 |
|
'#options' => array( |
| 78 |
|
'1' => t('1'), |
| 79 |
|
'5' => t('5'), |
| 80 |
|
'10' => t('10'), |
| 81 |
|
'20' => t('20'), |
| 82 |
|
'50' => t('50'), |
| 83 |
|
'100' => t('100'), |
| 84 |
|
'200' => t('200'), |
| 85 |
|
'500' => t('500'), |
| 86 |
|
'0' => t('Never add the posts'), |
| 87 |
|
), |
| 88 |
|
'#access' => user_access('override profile settings') || user_access('administer users'), |
| 89 |
|
); |
| 90 |
|
$form['buttons']['#weight'] = isset($form['buttons']['#weight']) ? $form['buttons']['#weight'] + 1 : 1; |
| 91 |
|
$form['#submit'][] = 'xmlsitemap_user_form_submit'; |
| 92 |
|
break; |
| 93 |
case 'node_type_form': |
case 'node_type_form': |
| 94 |
if (isset($form['identity']['type'])) { |
if (isset($form['identity']['type'])) { |
| 95 |
if (!isset($form['xmlsitemap'])) { |
if (!isset($form['xmlsitemap'])) { |