You are here

function theme_views_fb_teasers in Drupal for Facebook 5

Same name and namespace in other branches
  1. 5.2 fb_views.module \theme_views_fb_teasers()
  2. 6.3 fb_views/fb_views.module \theme_views_fb_teasers()
  3. 6.2 fb_views/fb_views.module \theme_views_fb_teasers()
  4. 7.3 fb_views/fb_views.module \theme_views_fb_teasers()

File

./fb_views.module, line 205

Code

function theme_views_fb_teasers($view, $nodes, $type) {

  //drupal_set_message("theme_views_fb_teasers, type is '$type'" . dprint_r($view, 1) . dprint_r($nodes, 1));  // debug

  // If were displaying in a block, its most likely the profile page, where
  // all styles have to be inline.  So here we do our best to mimic the
  // block view of a facebook discussion.
  foreach ($nodes as $data) {
    $node = node_load($data->nid);
    $output .= '<div style="padding: 10px 20px 10px 5px; border-bottom: 1px solid #cccccc;">';
    $output .= '<div style="font-weight: bold; font-size: 10px;">' . l($node->title, 'node/' . $data->nid, array(), NULL, NULL, FALSE) . "</div>";
    $node = node_build_content($node, TRUE, FALSE);
    $output .= drupal_render($node->content);
    $output .= "</div>\n";
  }
  return $output;
}