You are here

function jquery_social_stream_facebook_form in jQuery social stream 8

Same name and namespace in other branches
  1. 8.2 jquery_social_stream.module \jquery_social_stream_facebook_form()
  2. 7.2 jquery_social_stream.module \jquery_social_stream_facebook_form()
  3. 7 jquery_social_stream.module \jquery_social_stream_facebook_form()

Facebook settings form.

File

./jquery_social_stream.module, line 435
Code for the Campaign social media module.

Code

function jquery_social_stream_facebook_form($conf) {
  $form = array();
  $id_description = '<p>Facebook has 2 different ID options:</p>
<dl>
<dt>Facebook page wall posts</dt>
<dd>Enter the page ID. For facebook page posts the ID of your facebook page must be used -
this should be a numerical value, not the actual name of your facebook page (e.g. <em>157969574262873</em>).
To get the ID from your username you can use the following tool from facebook - replace "[username]" with the
name of your Facebook page profile: https://graph.facebook.com/[username]</dd>
<dt>Facebook page gallery images</dt>
<dd>Enter the text you would like to show for the facebook gallery name followed by "/" followed by the page gallery ID (e.g. <em>Facebook Timeline/376995711728</em>)</dd></dl>';
  _jquery_social_stream_settings_text($form, $conf, 'id', 'Facebook ID', $id_description, '', 512);
  _jquery_social_stream_settings_text($form, $conf, 'intro', 'Intro', 'Feed item intro text.', t('Posted to wall'));
  _jquery_social_stream_settings_text($form, $conf, 'out', 'Output', 'Stream item output: content blocks & order. Available options: intro, title, text, user, share.', 'intro,title,text,user,share');
  $text_options = array(
    'content' => 'Content',
    'contentSnippet' => 'Content snippet',
  );
  _jquery_social_stream_settings_select($form, $conf, 'text', 'Text', 'Select the RSS element to use in the feed output. <em>Content</em> (default) will output complete wall post text including any images. <em>Content snippet</em> shows brief introduction.', $text_options, 'content');
  $comments_options = range(0, 25);
  $comments_options = array_combine($comments_options, $comments_options);
  _jquery_social_stream_settings_select($form, $conf, 'comments', 'Comments', 'the maximum number of comments to display for facebook page gallery images.', $comments_options, 3);
  $width_options = array(
    3 => '600px',
    4 => '480px',
    5 => '320px',
    6 => '180px',
  );
  _jquery_social_stream_settings_select($form, $conf, 'image_width', 'Image width', 'Select the image size for facebook gallery images.', $width_options, 6);
  $form['icon'] = array(
    '#type' => 'value',
    '#value' => 'facebook.png',
  );
  return $form;
}