/ Published in: PHP
A Views export for Drupal 5. A block that only site admin and site manager roles can access, showing unpublished comments for blog entry content type.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$view = new stdClass(); $view->name = 'NewComments'; $view->description = 'Block for new blog entry comments.'; 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; array ( 'tablename' => 'comments', 'field' => 'timestamp', 'sortorder' => 'DESC', 'options' => 'normal', ), ); ); 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', ), ); array ( 'tablename' => 'comments', 'field' => 'status', 'operator' => '=', 'options' => '', 'value' => '1', ), ); ); $views[$view->name] = $view;