You are here

function comments_fb_settings in Facebook social plugins integration 7.2

Same name and namespace in other branches
  1. 6.2 plugins/fb_plugin/comments.inc \comments_fb_settings()

File

plugins/fb_plugin/comments.inc, line 30

Code

function comments_fb_settings($options) {
  $form = array();
  $form['numposts'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of posts'),
    '#description' => t('The maximum number of posts to display. You can set numposts to 0 to not display any comments. (Default value is 10.)'),
  );
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Width'),
    '#description' => t('The width of the Comments Box in pixels. (Default value is 550px.)'),
  );
  $form['colorscheme'] = array(
    '#type' => 'select',
    '#title' => t('Color Scheme'),
    '#description' => t('The color scheme of the plugin'),
    '#options' => array(
      'dark' => t('dark'),
      'light' => t('light'),
    ),
  );

  //@todo move this in the fb_social module settings form
  $form['migrated'] = array(
    '#type' => 'checkbox',
    '#title' => t('Migrate to the new version of facebook comments'),
    '#description' => t('If you are using the original version of the Facebook Comments box, check and the comments box will automatically switch to the new version'),
  );
  $defaults = comments_defaults();
  foreach ($form as $id => $f) {
    $form[$id]['#default_value'] = isset($options[$id]) ? $options[$id] : $defaults[$id];
  }
  return $form;
}