name = 'advanced_forum_user_posts';
$view->description = 'Shows the posts posted by the given user in the given forum.';
$view->tag = 'Advanced Forum';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
'nid_or_self' => array(
'label' => 'parent node',
'id' => 'nid_or_self',
'table' => 'node_comments',
'field' => 'nid_or_self',
'relationship' => 'none',
),
));
$handler->override_option('fields', array(
'type' => array(
'label' => 'Type',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 0,
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'nid' => array(
'label' => 'Nid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 1,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'teaser' => array(
'id' => 'teaser',
'table' => 'field_data_body',
'field' => 'entity_id',
'label' => 'Teaser',
'type' => 'text_summary_or_trimmed',
'hide_empty' => 0,
'exclude' => 1,
'alter' => array(
'alter_text' => 0,
'make_link' => 0,
'trim' => 0,
'max_length' => '200',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 1,
'html' => 0,
),
'settings' => array(
'trim_length' => '600',
),
),
'title' => array(
'label' => 'Post title',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 1,
'path' => 'node/[nid]',
'link_class' => '',
'alt' => '[teaser]',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'created' => array(
'label' => 'Posted on',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'relationship' => 'none',
),
'title_1' => array(
'label' => 'Topic title',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title_1',
'table' => 'node',
'field' => 'title',
'relationship' => 'nid_or_self',
),
'last_updated' => array(
'label' => 'Topic title / last updated',
'alter' => array(
'alter_text' => 1,
'text' => '
[last_updated]',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'date_format' => 'small',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'last_updated',
'table' => 'node_comment_statistics',
'field' => 'last_updated',
'relationship' => 'nid_or_self',
),
'new_comments' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => ' View ',
'suffix' => ' new',
'link_to_comment' => 1,
'exclude' => 0,
'id' => 'new_comments',
'table' => 'node',
'field' => 'new_comments',
'relationship' => 'nid_or_self',
),
'name' => array(
'label' => 'Forum',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_taxonomy' => 1,
'exclude' => 0,
'id' => 'name',
'table' => 'taxonomy_term_data',
'field' => 'name',
'relationship' => 'nid_or_self',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('sorts', array(
'created_1' => array(
'order' => 'DESC',
'granularity' => 'second',
'id' => 'created_1',
'table' => 'node',
'field' => 'created',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'uid' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'php',
'default_argument' => '',
'validate_type' => 'php',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 2,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => 'return $GLOBALS[\'user\']->uid;',
'validate_argument_node_type' => array(
'poll' => 0,
'forum' => 0,
'comment' => 0,
'forum_reply' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 1,
'validate_argument_php' => '$account = user_load($argument);
if (!$account || !$account->uid) {
return FALSE;
}
global $user;
if ($user->uid == $account->uid) {
$handler->validated_title = t(\'My forum posts\');
}
else {
$handler->validated_title = t(\'Forum posts by @user\', array(\'@user\' => $account->name));
}
return TRUE;',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'vid' => array(
'operator' => 'in',
'value' => array(
variable_get('forum_nav_vocabulary', '') => variable_get('forum_nav_vocabulary', ''),
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'vid',
'table' => 'taxonomy_term_data',
'field' => 'vid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'nid_or_self',
),
'term_node_tid_depth' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'term_node_tid_depth_op',
'identifier' => 'forum',
'label' => 'Forum',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'type' => 'select',
'limit' => TRUE,
'vid' => variable_get('forum_nav_vocabulary', ''),
'depth' => '2',
'id' => 'term_node_tid_depth',
'table' => 'node',
'field' => 'term_node_tid_depth',
'hierarchy' => 1,
'override' => array(
'button' => 'Override',
),
'relationship' => 'nid_or_self',
'reduce_duplicates' => 0,
),
'status_1' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status_1',
'table' => 'node',
'field' => 'status',
'override' => array(
'button' => 'Override',
),
'relationship' => 'nid_or_self',
),
'type' => array(
'operator' => 'in',
'value' => array(
'forum' => 'forum',
'comment' => 'comment',
'forum_reply' => 'forum_reply',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'type_op',
'identifier' => 'type',
'label' => 'Show only',
'optional' => 1,
'single' => 1,
'remember' => 1,
'reduce' => 1,
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('access', array(
'type' => 'role',
'role' => array(
'2' => 2,
),
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('title', '%1');
$handler->override_option('empty', 'You have no posts.');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 20);
$handler->override_option('use_pager', '1');
$handler->override_option('use_more', 0);
$handler->override_option('use_more_text', 'More topics');
$handler->override_option('distinct', 1);
$handler->override_option('style_plugin', 'forum_topic_list');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 1,
'order' => 'desc',
'columns' => array(
'type' => 'type',
'nid' => 'nid',
'teaser' => 'teaser',
'title' => 'title',
'created' => 'created',
'title_1' => 'last_updated',
'last_updated' => 'last_updated',
'new_comments' => 'last_updated',
'name' => 'name',
),
'info' => array(
'type' => array(
'sortable' => 1,
'separator' => '',
),
'nid' => array(
'sortable' => 0,
'separator' => '',
),
'teaser' => array(
'separator' => '',
),
'title' => array(
'sortable' => 0,
'separator' => '',
),
'created' => array(
'sortable' => 1,
'separator' => '',
),
'title_1' => array(
'sortable' => 0,
'separator' => '',
),
'last_updated' => array(
'sortable' => 1,
'separator' => '',
),
'new_comments' => array(
'separator' => '
',
),
'name' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'created',
'tid' => '',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'forum/user');
if (variable_get('advanced_forum_views_as_tabs', TRUE)) {
$handler->override_option('menu', array(
'type' => 'tab',
'title' => 'My Posts',
'description' => '',
'weight' => '3',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
}
else {
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
}
$handler = $view->new_display('panel_pane', 'Content pane', 'panel_pane_1');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
'name' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_taxonomy' => 1,
'exclude' => 0,
'id' => 'name',
'table' => 'taxonomy_term_data',
'field' => 'name',
'relationship' => 'nid_or_self',
'override' => array(
'button' => 'Use default',
),
),
'created' => array(
'label' => '',
'alter' => array(
'alter_text' => 1,
'text' => 'on [created]',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'date_format' => 'large',
'custom_date_format' => '',
'exclude' => 0,
'id' => 'created',
'table' => 'node',
'field' => 'created',
'relationship' => 'none',
'override' => array(
'button' => 'Use default',
),
),
'teaser' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 1,
'max_length' => '100',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 1,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'exclude' => 0,
'id' => 'teaser',
'table' => 'node_revision',
'field' => 'teaser',
'relationship' => 'nid_or_self',
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('title', 'My posts');
$handler->override_option('items_per_page', 1);
$handler->override_option('use_pager', '0');
$handler->override_option('style_plugin', 'default');
$handler->override_option('style_options', array());
$handler->override_option('pane_title', 'My forum posts');
$handler->override_option('pane_description', 'A block to display a user\'s most recent forum post');
$handler->override_option('pane_category', array(
'name' => 'Forum',
'weight' => '0',
));
$handler->override_option('allow', array(
'use_pager' => 0,
'items_per_page' => 0,
'offset' => 0,
'link_to_view' => 0,
'more_link' => 'more_link',
'path_override' => 'path_override',
'title_override' => 'title_override',
'exposed_form' => FALSE,
));
$handler->override_option('argument_input', array());
$handler->override_option('link_to_view', 0);
$handler->override_option('inherit_panels_path', 0);
// END VIEW EXPORT ********************************************************/
}