function jquery_social_stream_settings_form in jQuery social stream 7
Same name and namespace in other branches
- 8.2 jquery_social_stream.module \jquery_social_stream_settings_form()
- 8 jquery_social_stream.module \jquery_social_stream_settings_form()
- 7.2 jquery_social_stream.module \jquery_social_stream_settings_form()
General stream settings.
3 calls to jquery_social_stream_settings_form()
- JquerySocialStreamBean::form in plugins/
bean/ jquery_social_stream.inc - Builds extra settings for the block edit form.
- jquery_social_stream_block_configure in ./
jquery_social_stream.module - Implements hook_block_configure().
- jquery_social_stream_edit_form in plugins/
content_types/ jquery_social_stream.inc - 'Edit' callback for the content type.
File
- ./
jquery_social_stream.module, line 327 - Code for the Campaign social media module.
Code
function jquery_social_stream_settings_form($conf) {
$form = array();
$general_form = jquery_social_stream_common_form(!empty($conf['general']) ? $conf['general'] : array());
$general_form['#type'] = 'fieldset';
$general_form['#title'] = 'General settings';
$general_form['#tree'] = TRUE;
$general_form['#collapsible'] = TRUE;
$general_form['#collapsed'] = TRUE;
$form['id'] = array(
'#type' => 'textfield',
'#title' => 'Feed ID',
'#description' => 'Feed container <em>id</em> attribute.',
'#required' => TRUE,
'#default_value' => isset($conf['id']) ? $conf['id'] : '',
);
$form['header'] = array(
'#type' => 'textfield',
'#title' => t('Header text'),
'#description' => 'Text right above the feed.',
'#default_value' => isset($conf['header']) ? $conf['header'] : '',
);
$form['footer'] = array(
'#type' => 'textfield',
'#title' => t('Footer text'),
'#description' => 'Text right below the feed.',
'#default_value' => isset($conf['footer']) ? $conf['footer'] : '',
);
$form['general'] = $general_form;
$form['feeds'] = array(
'#type' => 'fieldset',
'#title' => t('Feeds'),
'#tree' => TRUE,
);
$types = array(
'facebook' => t('Facebook'),
'twitter' => t('Twitter'),
'google' => t('Google +1'),
'youtube' => t('YouTube'),
'flickr' => t('Flickr'),
'delicious' => t('Delicious'),
'pinterest' => t('Pinterest'),
'rss' => t('RSS feed'),
'lastfm' => t('Last.fm'),
'dribbble' => t('Dribbble'),
'vimeo' => t('Vimeo'),
'stumbleupon' => t('Stumbleupon'),
'deviantart' => t('Deviantart'),
'tumblr' => t('Tumblr'),
'instagram' => t('Instagram'),
);
foreach ($types as $type => $type_name) {
$function = "jquery_social_stream_{$type}_form";
if (function_exists($function)) {
$type_form = $function(!empty($conf['feeds'][$type]) ? $conf['feeds'][$type] : array());
$type_form['#type'] = 'fieldset';
$type_form['#title'] = $type_name;
$type_form['#collapsible'] = TRUE;
$type_form['#collapsed'] = TRUE;
$form['feeds'][$type] = $type_form;
}
}
return $form;
}