content_profile_admin_settings

Versions
6
content_profile_admin_settings(&$form_state, $type)

Menu callback; content profile settings.

Code

contributions/content_profile/content_profile.module, line 124

<?php
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;
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.