block_threadnew.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: block_threadnew.php 23608 2011-07-27 08:10:07Z cnteacher $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. require_once libfile('block_thread', 'class/block/forum');
  12. class block_threadnew extends block_thread {
  13. function block_threadnew() {
  14. $this->setting = array(
  15. 'fids' => array(
  16. 'title' => 'threadlist_fids',
  17. 'type' => 'mselect',
  18. 'value' => array()
  19. ),
  20. 'special' => array(
  21. 'title' => 'threadlist_special',
  22. 'type' => 'mcheckbox',
  23. 'value' => array(
  24. array(1, 'threadlist_special_1'),
  25. array(2, 'threadlist_special_2'),
  26. array(3, 'threadlist_special_3'),
  27. array(4, 'threadlist_special_4'),
  28. array(5, 'threadlist_special_5'),
  29. array(0, 'threadlist_special_0'),
  30. ),
  31. 'default' => array('0')
  32. ),
  33. 'viewmod' => array(
  34. 'title' => 'threadlist_viewmod',
  35. 'type' => 'radio'
  36. ),
  37. 'rewardstatus' => array(
  38. 'title' => 'threadlist_special_reward',
  39. 'type' => 'mradio',
  40. 'value' => array(
  41. array(0, 'threadlist_special_reward_0'),
  42. array(1, 'threadlist_special_reward_1'),
  43. array(2, 'threadlist_special_reward_2')
  44. ),
  45. 'default' => 0,
  46. ),
  47. 'picrequired' => array(
  48. 'title' => 'threadlist_picrequired',
  49. 'type' => 'radio',
  50. 'value' => '0'
  51. ),
  52. 'orderby' => array(
  53. 'title' => 'threadlist_orderby',
  54. 'type'=> 'mradio',
  55. 'value' => array(
  56. array('lastpost', 'threadlist_orderby_lastpost'),
  57. array('dateline', 'threadlist_orderby_dateline'),
  58. ),
  59. 'default' => 'lastpost'
  60. ),
  61. 'postdateline' => array(
  62. 'title' => 'threadlist_postdateline',
  63. 'type'=> 'mradio',
  64. 'value' => array(
  65. array('0', 'threadlist_postdateline_nolimit'),
  66. array('3600', 'threadlist_postdateline_hour'),
  67. array('86400', 'threadlist_postdateline_day'),
  68. array('604800', 'threadlist_postdateline_week'),
  69. array('2592000', 'threadlist_postdateline_month'),
  70. ),
  71. 'default' => '0'
  72. ),
  73. 'lastpost' => array(
  74. 'title' => 'threadlist_lastpost',
  75. 'type'=> 'mradio',
  76. 'value' => array(
  77. array('0', 'threadlist_lastpost_nolimit'),
  78. array('3600', 'threadlist_lastpost_hour'),
  79. array('86400', 'threadlist_lastpost_day'),
  80. array('604800', 'threadlist_lastpost_week'),
  81. array('2592000', 'threadlist_lastpost_month'),
  82. ),
  83. 'default' => '0'
  84. ),
  85. 'titlelength' => array(
  86. 'title' => 'threadlist_titlelength',
  87. 'type' => 'text',
  88. 'default' => 40
  89. ),
  90. 'summarylength' => array(
  91. 'title' => 'threadlist_summarylength',
  92. 'type' => 'text',
  93. 'default' => 80
  94. ),
  95. 'startrow' => array(
  96. 'title' => 'threadlist_startrow',
  97. 'type' => 'text',
  98. 'default' => 0
  99. ),
  100. );
  101. }
  102. function name() {
  103. return lang('blockclass', 'blockclass_thread_script_threadnew');
  104. }
  105. }
  106. ?>