'fieldset', '#title' => t('Display Preferences'), '#description' => t('Control how gravatars are displayed'), '#collapsible' => true, '#collapsed' => false, ); $form['gravatar_preferences']['gravatar_toggle'] = array( '#type' => 'checkbox', '#title' => t('Enable gravatar integration'), '#description' => t('Enable or disable to integration of gravatar user images for this site.'), '#options' => array( 0 => t('Disable'), 1 => t('Enable'), ), '#default_value' => variable_get('gravatar_toggle', 0), ); $form['gravatar_display'] = array( '#type' => 'fieldset', '#title' => t('Display Preferences'), '#description' => t('Control how gravatars are displayed'), '#collapsible' => true, '#collapsed' => false, ); $form['gravatar_display']['gravatar_displaysize'] = array( '#type' => 'select', '#title' => t('Image size'), '#description' => t('Select your preferred gravatar image size (max. 80x80)'), '#default_value' => variable_get('gravatar_displaysize', 48), '#options' => drupal_map_assoc(array(16, 22, 24, 32, 48, 64, 72, 80), '_gravatar_admin_settings_map_size'), '#disabled' => variable_get('gravatar_toggle', 0) ? false : true, ); $form['gravatar_display']['gravatar_imagerating'] = array( '#type' => 'select', '#title' => t('Maturity filter'), '#description' => t('An optional maturity rating parameter with a value (MPAA nomenclatura) that determines the highest rating (inclusive) that will be returned.'), '#default_value' => variable_get('gravatar_displayrating', 'PG'), '#options' => drupal_map_assoc(array(0, 'G', 'PG', 'R', 'X')), '#disabled' => variable_get('gravatar_toggle', 0) ? false : true, ); $form['gravatar_display']['gravatar_imagedefault'] = array( '#type' => 'radios', '#title' => t('Default Avatar Image'), '#description' => t('Specifies an image that should be returned if either the requested email address has no associated gravatar, or that gravatar has a rating higher than is allowed by the "rating" parameter.'), '#options' => array( // 0 => t('No default image'), sound nice in theory, but there is no way of knowing 'no' gravatar is available 1 => t('Global default user image'), 2 => t('Gravatar integration default user image'), 3 => t('Image provided by gravatar.com'), ), '#default_value' => variable_get('gravatar_imagedefault', 1), '#prefix' => '