You are here

function fblikebutton_static_settings in Facebook Like Button 6.2

Same name and namespace in other branches
  1. 7.2 fblikebutton.admin.inc \fblikebutton_static_settings()

Settings for the static FB Like button block.

1 string reference to 'fblikebutton_static_settings'
fblikebutton_menu in ./fblikebutton.module
Implements of hook_menu().

File

./fblikebutton.admin.inc, line 138
Admin functions for fblikebutton.

Code

function fblikebutton_static_settings() {
  global $base_url;
  $form['fblikebutton_static_block_description'] = array(
    '#markup' => '<p>' . t('Set the static URL to like with the button. This Like button will like the given URL, no matter on which page it is displayed. To position this block go the ' . l(t('block page'), 'admin/structure/block') . '.</p>'),
  );
  $form['fblikebutton_static_block_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Button settings'),
    '#collapsible' => FALSE,
  );
  $form['fblikebutton_static_block_settings']['fblikebutton_block_url'] = array(
    '#type' => 'textfield',
    '#default_value' => variable_get('fblikebutton_block_url', $base_url),
    '#description' => t('URL of the page to like (could be your homepage or a facebook page e.g.)'),
  );
  $form['fblikebutton_static_block_appearance'] = array(
    '#type' => 'fieldset',
    '#title' => t('Button appearance'),
    '#collapsible' => FALSE,
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_layout'] = array(
    '#type' => 'select',
    '#title' => t('Layout style'),
    '#options' => array(
      'standard' => t('Standard'),
      'box_count' => t('Box Count'),
      'button_count' => t('Button Count'),
    ),
    '#default_value' => variable_get('fblikebutton_bl_layout', 'standard'),
    '#description' => t('Determines the size and amount of social context next to the button'),
  );

  // The actial values passed in from the options will be converted to a boolean
  // in the validation function, so it doesn't really matter what we use.
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_show_faces'] = array(
    '#type' => 'select',
    '#title' => t('Display faces in the box'),
    '#options' => array(
      'show' => t('Show faces'),
      'hide' => t('Do not show faces'),
    ),
    '#default_value' => variable_get('fblikebutton_bl_show_faces', TRUE) ? 'show' : 'hide',
    '#description' => t('Show profile pictures below the button. Only works with Standard layout'),
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_action'] = array(
    '#type' => 'select',
    '#title' => t('Verb to display'),
    '#options' => array(
      'like' => t('Like'),
      'recommend' => t('Recommend'),
    ),
    '#default_value' => variable_get('fblikebutton_bl_action', 'like'),
    '#description' => t('The verb to display in the button.'),
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_font'] = array(
    '#type' => 'select',
    '#title' => t('Font'),
    '#options' => array(
      'arial' => 'Arial',
      'lucida+grande' => 'Lucida Grande',
      'segoe+ui' => 'Segoe UI',
      'tahoma' => 'Tahoma',
      'trebuchet+ms' => 'Trebuchet MS',
      'verdana' => 'Verdana',
    ),
    '#default_value' => variable_get('fblikebutton_bl_font', 'arial'),
    '#description' => t('The font to display in the button'),
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_color_scheme'] = array(
    '#type' => 'select',
    '#title' => t('Color scheme'),
    '#options' => array(
      'light' => t('Light'),
      'dark' => t('Dark'),
    ),
    '#default_value' => variable_get('fblikebutton_bl_color_scheme', 'light'),
    '#description' => t('The color scheme of box environtment'),
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_iframe_width'] = array(
    '#type' => 'textfield',
    '#title' => t('Width of the iframe (px)'),
    '#default_value' => variable_get('fblikebutton_bl_iframe_width', '450'),
    '#description' => t('Width of the iframe, in pixels. Default is 450. <em>Note: lower values may crop the output.</em>'),
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_iframe_height'] = array(
    '#type' => 'textfield',
    '#title' => t('Height of the iframe (px)'),
    '#default_value' => variable_get('fblikebutton_bl_iframe_height', '80'),
    '#description' => t('Height of the iframe, in pixels. Default is 80. <em>Note: lower values may crop the output.</em>'),
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_iframe_css'] = array(
    '#type' => 'textfield',
    '#title' => t('Extra css styling needed'),
    '#default_value' => variable_get('fblikebutton_bl_iframe_css', ''),
    '#description' => t('Extra css attributes needed to make the iframe behave for your specific requirements. Will not necessarily overwrite existing styling. To alter the dimensions of the iframe, use the height and width fields found above.<br/>Example: <em>float: right; padding: 5px;</em>'),
  );
  $form['fblikebutton_static_block_appearance']['fblikebutton_bl_language'] = array(
    '#type' => 'textfield',
    '#title' => t('Language'),
    '#default_value' => variable_get('fblikebutton_bl_language', 'en_US'),
    '#description' => t('Specific language to use. Default is English. Examples:<br />French (France): <em>fr_FR</em><br />French (Canada): <em>fr_CA</em><br />More information can be found at http://developers.facebook.com/docs/internationalization/ and a full XML list can be found at http://www.facebook.com/translations/FacebookLocales.xml'),
  );
  $form['#validate'] = array(
    'fblikebutton_config_form_validate',
  );
  return system_settings_form($form);
}