block_bloghot.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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_bloghot.php 25525 2011-11-14 04:39:11Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. require_once libfile('block_blog', 'class/block/space');
  12. class block_bloghot extends block_blog {
  13. var $setting = array();
  14. function block_bloghot() {
  15. $this->setting = array(
  16. 'hours' => array(
  17. 'title' => 'bloglist_hours',
  18. 'type' => 'mradio',
  19. 'value' => array(
  20. array('', 'bloglist_hours_nolimit'),
  21. array('1', 'bloglist_hours_hour'),
  22. array('24', 'bloglist_hours_day'),
  23. array('168', 'bloglist_hours_week'),
  24. array('720', 'bloglist_hours_month'),
  25. array('8760', 'bloglist_hours_year'),
  26. ),
  27. 'default' => '720'
  28. ),
  29. 'catid' => array(
  30. 'title' => 'bloglist_catid',
  31. 'type'=>'mselect',
  32. ),
  33. 'picrequired' => array(
  34. 'title' => 'bloglist_picrequired',
  35. 'type' => 'radio',
  36. 'default' => '0'
  37. ),
  38. 'titlelength' => array(
  39. 'title' => 'bloglist_titlelength',
  40. 'type' => 'text',
  41. 'default' => 40
  42. ),
  43. 'summarylength' => array(
  44. 'title' => 'bloglist_summarylength',
  45. 'type' => 'text',
  46. 'default' => 80
  47. ),
  48. 'startrow' => array(
  49. 'title' => 'bloglist_startrow',
  50. 'type' => 'text',
  51. 'default' => 0
  52. ),
  53. );
  54. }
  55. function name() {
  56. return lang('blockclass', 'blockclass_blog_script_bloghot');
  57. }
  58. function cookparameter($parameter) {
  59. $parameter['orderby'] = 'hot';
  60. return parent::cookparameter($parameter);
  61. }
  62. }
  63. ?>