You are here

function content_profile_admin_settings in Content Profile 6

Menu callback; content profile settings.

2 string references to 'content_profile_admin_settings'
content_profile_menu in ./content_profile.module
Implementation of hook_menu().
content_profile_registration_form_alter in modules/content_profile_registration.module
Implementation of hook_form_alter().

File

./content_profile.module, line 120

Code

function content_profile_admin_settings(&$form_state, $type) {
  $form_state['type'] = $type;
  $form['weight'] = array(
    '#type' => 'weight',
    '#title' => t("Weight"),
    '#default_value' => content_profile_get_settings($type, 'weight'),
    '#description' => t('The weight of content of this content type where ever they appear - this applies to the input form integration as well to the display integration.'),
    '#weight' => 5,
  );
  $form['display'] = array(
    '#type' => 'fieldset',
    '#title' => t('Display settings'),
    '#description' => t('Customize the display of this content profile.'),
    '#collapsible' => TRUE,
  );
  $form['display']['user_display'] = array(
    '#type' => 'radios',
    '#title' => t("User page display style"),
    '#default_value' => content_profile_get_settings($type, 'user_display'),
    '#options' => array(
      0 => t("Don't display this content profile on the user account page"),
      'link' => t('Display it as link to the profile content'),
      'full' => t('Display the full content'),
      'teaser' => t("Display the content's teaser"),
    ),
  );
  $form['display']['edit_link'] = array(
    '#type' => 'checkbox',
    '#title' => t("Include an edit link to the display"),
    '#default_value' => content_profile_get_settings($type, 'edit_link'),
  );
  $form['display']['add_link'] = array(
    '#type' => 'checkbox',
    '#title' => t("Show a link to the content profile creation page, if there is no profile."),
    '#default_value' => content_profile_get_settings($type, 'add_link'),
    '#description' => t("If selected and the user has no profile of this type yet, a link to add one is shown on the user page."),
  );
  $form['display']['edit_tab'] = array(
    '#type' => 'radios',
    '#title' => t("Profile edit tab"),
    '#default_value' => content_profile_get_settings($type, 'edit_tab'),
    '#options' => array(
      0 => t('None'),
      'top' => t("Show a tab at the user's page"),
      'sub' => t("Show a secondary tab below the user's edit tab"),
    ),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
    '#weight' => 10,
  );
  return $form;
}