function _spaces_core_views_blog in Spaces 5
Same name and namespace in other branches
- 5.2 spaces_core/spaces_core.module \_spaces_core_views_blog()
1 string reference to '_spaces_core_views_blog'
- spaces_core_views_default_views in spaces_core/
spaces_core.module - Implementation of hook_default_views
File
- spaces_core/
spaces_core.module, line 367
Code
function _spaces_core_views_blog() {
$view = new stdClass();
$view->name = 'spaces_blog';
$view->description = t('Provides a default blog listing that is filterable by uid.');
$view->access = array();
$view->view_args_php = '';
$view->menu = TRUE;
$view->menu_title = t('Blog');
$view->page = TRUE;
$view->page_title = t('Blog');
$view->page_empty = '<?php print _spaces_views_empty("blog"); ?>';
$view->page_empty_format = '2';
$view->page_type = 'teaser';
$view->url = 'blog';
$view->use_pager = TRUE;
$view->nodes_per_page = '5';
$view->block = TRUE;
$view->block_title = t('Recent blog posts');
$view->block_empty = "<p class='views-empty'>" . t('No blog entries found.') . "</p>";
$view->block_empty_format = '1';
$view->block_type = 'spaces_datetitle';
$view->nodes_per_block = '3';
$view->block_more = TRUE;
$view->sort = array(
array(
'tablename' => 'node',
'field' => 'created',
'sortorder' => 'DESC',
'options' => 'normal',
),
);
$view->argument = array(
array(
'type' => 'uid',
'argdefault' => '2',
'title' => '%1\'s Blog',
'options' => '',
'wildcard' => 'all',
'wildcard_substitution' => '',
),
array(
'type' => 'node_feed',
'argdefault' => '2',
'title' => 'Blog',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array(
array(
'tablename' => 'node',
'field' => 'created',
'label' => '',
'handler' => 'views_handler_field_date_small',
),
array(
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'options' => 'link',
),
);
$view->filter = array(
array(
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array(
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array(
0 => 'blog',
),
),
array(
'tablename' => 'og_ancestry',
'field' => 'picg',
'operator' => '=',
'options' => '',
'value' => '***CURRENT_GID***',
),
);
$view->exposed_filter = array();
$view->requires = array(
node,
);
return $view;
}