SocialStyle:Upgrade to version 2.2:Twitter Updates view Import code

From MtTWiki

Jump to: navigation, search
$view = new view();
$view->name = 'mt_tweets';
$view->description = 'Displays Twitter.com status messages for users who have associated Twitter accounts.';
$view->tag = '';
$view->base_table = 'twitter';
$view->human_name = 'Twitter Updates';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
 
/* Display: Tweets */
$handler = $view->new_display('default', 'Tweets', 'default');
$handler->display->display_options['title'] = 'Twitter Updates';
$handler->display->display_options['css_class'] = 'view-tweets';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['use_more_text'] = 'Read More';
$handler->display->display_options['link_display'] = 'page_2';
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '3';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['grouping'] = '';
$handler->display->display_options['style_options']['columns'] = array(
  'profile_image_url' => 'profile_image_url',
  'text' => 'text',
  'created_time' => 'text',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'profile_image_url' => array(
    'sortable' => 0,
    'separator' => '',
  ),
  'text' => array(
    'sortable' => 0,
    'separator' => ' — ',
  ),
  'created_time' => array(
    'sortable' => 0,
    'separator' => '',
  ),
);
/* Field: Twitter: Profile image */
$handler->display->display_options['fields']['profile_image_url']['id'] = 'profile_image_url';
$handler->display->display_options['fields']['profile_image_url']['table'] = 'twitter_account';
$handler->display->display_options['fields']['profile_image_url']['field'] = 'profile_image_url';
$handler->display->display_options['fields']['profile_image_url']['label'] = '';
/* Field: Twitter: Message text */
$handler->display->display_options['fields']['text']['id'] = 'text';
$handler->display->display_options['fields']['text']['table'] = 'twitter';
$handler->display->display_options['fields']['text']['field'] = 'text';
$handler->display->display_options['fields']['text']['label'] = '';
$handler->display->display_options['fields']['text']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['text']['link_urls'] = 1;
$handler->display->display_options['fields']['text']['link_usernames'] = 1;
$handler->display->display_options['fields']['text']['link_hashtags'] = 1;
/* Field: Twitter: Created time */
$handler->display->display_options['fields']['created_time']['id'] = 'created_time';
$handler->display->display_options['fields']['created_time']['table'] = 'twitter';
$handler->display->display_options['fields']['created_time']['field'] = 'created_time';
$handler->display->display_options['fields']['created_time']['label'] = '';
$handler->display->display_options['fields']['created_time']['date_format'] = 'time ago';
/* Sort criterion: Twitter: Created time */
$handler->display->display_options['sorts']['created_time']['id'] = 'created_time';
$handler->display->display_options['sorts']['created_time']['table'] = 'twitter';
$handler->display->display_options['sorts']['created_time']['field'] = 'created_time';
$handler->display->display_options['sorts']['created_time']['order'] = 'DESC';
/* Filter criterion: Twitter: Protected status */
$handler->display->display_options['filters']['protected']['id'] = 'protected';
$handler->display->display_options['filters']['protected']['table'] = 'twitter_account';
$handler->display->display_options['filters']['protected']['field'] = 'protected';
$handler->display->display_options['filters']['protected']['value'] = 0;
$handler->display->display_options['filters']['protected']['group'] = '0';
$handler->display->display_options['filters']['protected']['expose']['operator'] = FALSE;
 
/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block');
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['defaults']['use_more'] = FALSE;
$handler->display->display_options['use_more'] = TRUE;
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['inline'] = array(
  'text' => 'text',
  'created_time' => 'created_time',
);
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Field: Twitter: Message text */
$handler->display->display_options['fields']['text']['id'] = 'text';
$handler->display->display_options['fields']['text']['table'] = 'twitter';
$handler->display->display_options['fields']['text']['field'] = 'text';
$handler->display->display_options['fields']['text']['label'] = '';
$handler->display->display_options['fields']['text']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['text']['link_urls'] = 1;
$handler->display->display_options['fields']['text']['link_usernames'] = 1;
$handler->display->display_options['fields']['text']['link_hashtags'] = 1;
$handler->display->display_options['fields']['text']['hashtags_url'] = 'https://twitter.com/search?q=%23';
$handler->display->display_options['fields']['text']['link_attributes'] = 1;
$handler->display->display_options['defaults']['arguments'] = FALSE;
$handler->display->display_options['block_description'] = 'Twitter Updates';
 
/* Display: Twitter Updates */
$handler = $view->new_display('page', 'Twitter Updates', 'page_2');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['title'] = 'Twitter Updates';
$handler->display->display_options['display_description'] = 'Displays a formatted list of tweets';
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['defaults']['pager'] = FALSE;
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '15';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['quantity'] = '9';
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Field: Twitter: Message text */
$handler->display->display_options['fields']['text']['id'] = 'text';
$handler->display->display_options['fields']['text']['table'] = 'twitter';
$handler->display->display_options['fields']['text']['field'] = 'text';
$handler->display->display_options['fields']['text']['label'] = '';
$handler->display->display_options['fields']['text']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['text']['link_urls'] = 1;
$handler->display->display_options['fields']['text']['link_usernames'] = 1;
$handler->display->display_options['fields']['text']['link_hashtags'] = 1;
$handler->display->display_options['fields']['text']['hashtags_url'] = 'https://twitter.com/search?q=%23';
$handler->display->display_options['fields']['text']['link_attributes'] = 1;
$handler->display->display_options['defaults']['arguments'] = FALSE;
/* Contextual filter: Twitter: Login name */
$handler->display->display_options['arguments']['screen_name']['id'] = 'screen_name';
$handler->display->display_options['arguments']['screen_name']['table'] = 'twitter';
$handler->display->display_options['arguments']['screen_name']['field'] = 'screen_name';
$handler->display->display_options['arguments']['screen_name']['title_enable'] = TRUE;
$handler->display->display_options['arguments']['screen_name']['title'] = 'Tweets by @%1';
$handler->display->display_options['arguments']['screen_name']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['screen_name']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['screen_name']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['screen_name']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['screen_name']['limit'] = '0';
$handler->display->display_options['path'] = 'twitter-updates';
Personal tools
Namespaces
Variants
Actions
Main Menu
Premium Themes
Toolsets
Freebies
Navigation
Toolbox
This wiki is hosted by morethanthemes.com, creators of top quality premium and free themes for Drupal 6 and 7, as well as HTML and PSD themes.
Find out more
for Drupal 6 & 7