You are here

function fb_views_views_style_plugins in Drupal for Facebook 7.3

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

Introduce a theme style that mimics a facebook discussion board.

To use: make a theme which provides a page view, and select view type 'Facebook Discussion'. Then under Fields, include Node: Title, Node: Created Time, Node: Author Name, Comment: Count, Comment: Last Comment Author, Comment: Last Comment Time.

It may not look exactly like a facebook discussion, but comes close.

File

fb_views/fb_views.module, line 101
Facebook-specific views arguments, filters, etc...

Code

function fb_views_views_style_plugins() {
  $items = array();
  $items['fb_discussion'] = array(
    'name' => t('Facebook Discussion'),
    'theme' => 'views_fb_discussion',
    'summary_theme' => 'views_summary',
    'needs_table_header' => TRUE,
    'needs_fields' => TRUE,
  );
  $items['fb_teasers'] = array(
    'name' => t('Facebook Teaser List'),
    'theme' => 'views_fb_teasers',
    'summary_theme' => 'views_summary',
    'needs_table_header' => TRUE,
    'needs_fields' => TRUE,
  );
  return $items;
}