You are here

function fb_social_preset_view in Facebook social plugins integration 7.2

Same name and namespace in other branches
  1. 6.2 fb_social.module \fb_social_preset_view()

returns the fbml content of the plugin

9 calls to fb_social_preset_view()
fb_social_block_view in ./fb_social.module
Implements hook_block_view().
fb_social_handler_field::render in plugins/views/fb_social_handler_field.inc
Implements views_handler_field#render().
_fb_social_comments_nodeapi_view in plugins/fb_plugin/comments.inc
nodeapi_view callback for this plugin
_fb_social_like_link in plugins/fb_plugin/like.inc
Pseudo hook_link for this plugin
_fb_social_like_nodeapi_view in plugins/fb_plugin/like.inc
nodeapi_view callback for this plugin

... See full list

File

./fb_social.module, line 539

Code

function fb_social_preset_view($preset) {
  $plugin_type = $preset->plugin_type;
  $options = $preset->fb_attrs;
  $output = theme('fb_social_plugin', array(
    'plugin_type' => $plugin_type,
    'options' => $options,
  ));

  // if this is a "comment" plugin, get comments from facebook and print them
  // behind the iframe
  if ($plugin_type == 'comments' && isset($preset->settings['plugin_comments_seo']) && $preset->settings['plugin_comments_seo']['seo']) {
    $cache_length = $preset->settings['plugin_comments_seo']['cache_length'];
    $nr_comments = $preset->settings['plugin_comments_seo']['nr_comments'];
    $url = empty($options['href']) ? fb_social_url($_GET['q']) : $options['href'];
    module_load_include('inc', 'fb_social', 'plugins/fb_plugin/comments');
    $output .= _fb_social_comments_seo($url, $nr_comments, $cache_length);
  }
  return $output;
}