You are here

function social_comments_settings_form in Open Social 7

Administrative settings form.

1 string reference to 'social_comments_settings_form'
social_comments_menu in ./social_comments.module
Implements hook_menu().

File

includes/social_comments.admin.inc, line 11
Social administration settings.

Code

function social_comments_settings_form($form, &$form_state) {
  $form = array();
  $form['google'] = array(
    '#type' => 'fieldset',
    '#title' => t('Google settings'),
  );
  $form['google']['social_comments_google_cache'] = array(
    '#type' => 'textfield',
    '#title' => t('Google cache expire'),
    '#description' => t('Enter in seconds'),
    '#default_value' => variable_get('social_comments_google_cache', 600),
  );
  $form['google']['social_comments_google_api_key'] = array(
    '#type' => 'textfield',
    '#title' => t('Google API key'),
    '#description' => t('You can create it here !link', array(
      '!link' => l(t('Google API'), 'https://code.google.com/apis/console', array(
        'attributes' => array(
          'target' => '_blank',
        ),
      )),
    )),
    '#default_value' => variable_get('social_comments_google_api_key'),
  );
  $form['facebook'] = array(
    '#type' => 'fieldset',
    '#title' => t('Facebook Settings'),
  );
  $form['facebook']['social_comments_facebook_cache'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook cache expire'),
    '#description' => t('Enter in seconds'),
    '#default_value' => variable_get('social_comments_facebook_cache', 600),
  );
  $form['facebook']['social_comments_facebook_app_id'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook App ID'),
    '#default_value' => variable_get('social_comments_facebook_app_id'),
  );
  $form['facebook']['social_comments_facebook_app_secret'] = array(
    '#type' => 'textfield',
    '#title' => t('Facebook App Secret'),
    '#default_value' => variable_get('social_comments_facebook_app_secret'),
  );
  $form['twitter'] = array(
    '#type' => 'fieldset',
    '#title' => t('Twitter Settings'),
  );
  $form['twitter']['social_comments_twitter_cache'] = array(
    '#type' => 'textfield',
    '#title' => t('Twitter cache expire'),
    '#description' => t('Enter in seconds'),
    '#default_value' => variable_get('social_comments_twitter_cache', 600),
  );
  return system_settings_form($form);
}