- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
function event_form_alter($form_id, &$form) {
global $user;
$node = isset($form['#node']) ? $form['#node'] : NULL;
switch ($form_id) {
// node settings form
case 'node_type_form':
$type = (isset($form['old_type']) && isset($form['old_type']['#value'])) ? $form['old_type']['#value'] : NULL;
$form['workflow']['event_nodeapi'] = array(
'#type' => 'radios',
'#title' => t('Show in event calendar'),
'#default_value' => variable_get('event_nodeapi_'. $type, 'never'),
'#options' => array('all' => t('All views'), 'solo' => t('Only in views for this type'), 'never' => t('Never')),
'#description' => t('All views: This content type will be available for display on all calendar views, including with other events.<br />Only in views for this type: This content type will only appear in calendar views specific to this type and never with other events.<br />Never: This content type will not be associated with the events calendar.')
);
break;
#...
}
}
guest 10.01.2010 17:21 # 0
vectoroc 10.01.2010 18:11 # 0
Я вообще проблемное место искал, оказалось, что оно в другом месте
guest6 08.09.2023 15:17 # 0
mrbig66 15.01.2010 12:19 # 0
Из говнокода только это.
Ну и от глобальных переменных лучше избавляться.
vectoroc 15.01.2010 12:28 # 0
guest6 08.09.2023 15:19 # 0