PHP Drupal:新评论块
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP Drupal:新评论块相关的知识,希望对你有一定的参考价值。
$view = new stdClass();
$view->name = 'NewComments';
$view->description = 'Block for new blog entry comments.';
$view->access = array (
0 => '3',
1 => '4',
);
$view->view_args_php = '';
$view->page = FALSE;
$view->page_title = '';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'node';
$view->url = '';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->block = TRUE;
$view->block_title = 'New Comments';
$view->block_header = '';
$view->block_header_format = '1';
$view->block_footer = '<a href="/admin/content/comment/list/approval">Approval Queue</a>';
$view->block_footer_format = '1';
$view->block_empty = '';
$view->block_empty_format = '1';
$view->block_type = 'list';
$view->nodes_per_block = '25';
$view->block_more = FALSE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = FALSE;
$view->sort = array (
array (
'tablename' => 'comments',
'field' => 'timestamp',
'sortorder' => 'DESC',
'options' => 'normal',
),
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'comments',
'field' => 'subject',
'label' => '',
'handler' => 'views_handler_field_commentlink',
'options' => 'link',
),
array (
'tablename' => 'comments',
'field' => 'name',
'label' => '',
),
array (
'tablename' => 'comments',
'field' => 'timestamp',
'label' => '',
'handler' => 'views_handler_field_date_small',
),
);
$view->filter = array (
array (
'tablename' => 'comments',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
);
$view->exposed_filter = array (
);
$view->requires = array(comments);
$views[$view->name] = $view;
以上是关于PHP Drupal:新评论块的主要内容,如果未能解决你的问题,请参考以下文章
drupal 视图中的 Disqus 评论
PHP Drupal改变评论表格
PHP 从drupal anon作者评论中删除“未经验证”
Drupal,在自定义 php 页面上嵌入视图块/结果
PHP Drupal page.tpl.php导航块
Drupal自定义块在列表中不可见