Posted By

shrop on 05/15/08


Tagged

drupal views


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

basicmagic
panatlantica
aleprieto


Drupal: New Comments Block


 / 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.

  1. $view = new stdClass();
  2. $view->name = 'NewComments';
  3. $view->description = 'Block for new blog entry comments.';
  4. $view->access = array (
  5. 0 => '3',
  6. 1 => '4',
  7. );
  8. $view->view_args_php = '';
  9. $view->page = FALSE;
  10. $view->page_title = '';
  11. $view->page_header = '';
  12. $view->page_header_format = '1';
  13. $view->page_footer = '';
  14. $view->page_footer_format = '1';
  15. $view->page_empty = '';
  16. $view->page_empty_format = '1';
  17. $view->page_type = 'node';
  18. $view->url = '';
  19. $view->use_pager = TRUE;
  20. $view->nodes_per_page = '10';
  21. $view->block = TRUE;
  22. $view->block_title = 'New Comments';
  23. $view->block_header = '';
  24. $view->block_header_format = '1';
  25. $view->block_footer = '<a href="/admin/content/comment/list/approval">Approval Queue</a>';
  26. $view->block_footer_format = '1';
  27. $view->block_empty = '';
  28. $view->block_empty_format = '1';
  29. $view->block_type = 'list';
  30. $view->nodes_per_block = '25';
  31. $view->block_more = FALSE;
  32. $view->block_use_page_header = FALSE;
  33. $view->block_use_page_footer = FALSE;
  34. $view->block_use_page_empty = FALSE;
  35. $view->sort = array (
  36. 'tablename' => 'comments',
  37. 'field' => 'timestamp',
  38. 'sortorder' => 'DESC',
  39. 'options' => 'normal',
  40. ),
  41. );
  42. $view->argument = array (
  43. );
  44. $view->field = array (
  45. 'tablename' => 'comments',
  46. 'field' => 'subject',
  47. 'label' => '',
  48. 'handler' => 'views_handler_field_commentlink',
  49. 'options' => 'link',
  50. ),
  51. 'tablename' => 'comments',
  52. 'field' => 'name',
  53. 'label' => '',
  54. ),
  55. 'tablename' => 'comments',
  56. 'field' => 'timestamp',
  57. 'label' => '',
  58. 'handler' => 'views_handler_field_date_small',
  59. ),
  60. );
  61. $view->filter = array (
  62. 'tablename' => 'comments',
  63. 'field' => 'status',
  64. 'operator' => '=',
  65. 'options' => '',
  66. 'value' => '1',
  67. ),
  68. );
  69. $view->exposed_filter = array (
  70. );
  71. $view->requires = array(comments);
  72. $views[$view->name] = $view;

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: edhardyhive on August 18, 2010

Gucci was founded in 1921 by Guccio Gucci.In 1938, Wholesale Gucci Shoes Gucci expanded and a boutique was opened in Rome. Guccio was responsible for designing many of the company's Louis Vuitton Sneakers products. In 1947, Gucci introduced the bamboo handle handbag, which is still a company mainstay. During the 1950s, Replica Sneakers From China Gucci also developed the trademark striped webbing, which was derived from the saddle girth, Nike Air Max 2010 and the suede moccasin with a metal horsebit.

Posted By: edhardyhive on August 18, 2010

louis vuitton clothing nike air max 24-7 dolce gabbana shoes discount prada sneakers nike air max 2010 new chanel jewelry urabn coogi clothing replica gucci sneakers cheap jordan shoes discount burberry handbag

You need to login to post a comment.