| 1 |
<?php
|
| 2 |
// $Id: game_character.admin.inc,v 1.11 2008/07/16 02:22:44 morbus Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Admin functions for the Game Character module.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Configure Game Character; menu callback for admin/settings/game_character.
|
| 11 |
*/
|
| 12 |
function game_character_settings() {
|
| 13 |
$form = array();
|
| 14 |
|
| 15 |
$types = node_get_types('names');
|
| 16 |
|
| 17 |
$form['nodes'] = array(
|
| 18 |
'#type' => 'fieldset',
|
| 19 |
'#title' => t('Game character types'),
|
| 20 |
'#collapsible' => TRUE,
|
| 21 |
);
|
| 22 |
$form['nodes']['game_character_types'] = array(
|
| 23 |
'#type' => 'checkboxes',
|
| 24 |
'#title' => t('Game character types'),
|
| 25 |
'#default_value' => variable_get('game_character_types', array()),
|
| 26 |
'#options' => $types,
|
| 27 |
'#description' => t("Select the node type(s) that will be used for characters."),
|
| 28 |
);
|
| 29 |
|
| 30 |
$form['active'] = array(
|
| 31 |
'#type' => 'fieldset',
|
| 32 |
'#title' => t('Active characters'),
|
| 33 |
'#collapsible' => TRUE,
|
| 34 |
);
|
| 35 |
$form['active']['game_character_multiple_active'] = array(
|
| 36 |
'#type' => 'checkbox',
|
| 37 |
'#title' => t('Multiple active'),
|
| 38 |
'#description' => t('If checked, then users may select more than one game character at a time.'),
|
| 39 |
'#default_value' => variable_get('game_character_multiple_active', TRUE),
|
| 40 |
);
|
| 41 |
$form['active']['game_character_store_active_in_session'] = array(
|
| 42 |
'#type' => 'checkbox',
|
| 43 |
'#title' => t('Store active in session'),
|
| 44 |
'#description' => t('If checked, then store the active character in the session, rather than soley in the database. This allows a user to control different characters in different sessions. (Must be checked to allow anonymous users to have active characters.)'),
|
| 45 |
'#default_value' => variable_get('game_character_store_active_in_session', TRUE),
|
| 46 |
);
|
| 47 |
|
| 48 |
$form['claims'] = array(
|
| 49 |
'#type' => 'fieldset',
|
| 50 |
'#title' => t('Game character claims'),
|
| 51 |
'#collapsible' => TRUE,
|
| 52 |
);
|
| 53 |
$form['claims']['game_character_allow_claims'] = array(
|
| 54 |
'#type' => 'checkbox',
|
| 55 |
'#title' => t('Allow game character claims to select node'),
|
| 56 |
'#description' => t('If checked, then when anonymous users create a game character node, a resulting unique claim URL will be displayed, allowing the user to select that character in the future.'),
|
| 57 |
'#default_value' => variable_get('game_character_allow_claims', TRUE),
|
| 58 |
);
|
| 59 |
$form['claims']['game_character_allow_claim_ownership'] = array(
|
| 60 |
'#type' => 'checkbox',
|
| 61 |
'#title' => t('Allow game character claims to change node ownership'),
|
| 62 |
'#description' => t('If checked, then when anonymous users create a game character node, a resulting unique claim URL will be displayed, allowing the user to claim ownership of the node when logging in with a user role allowing the possibility.'),
|
| 63 |
'#default_value' => variable_get('game_character_allow_claim_ownership', TRUE),
|
| 64 |
);
|
| 65 |
|
| 66 |
return system_settings_form($form);
|
| 67 |
}
|