Diễn đàn Trái Tim Yên Bái 2024

 Quên mật khẩu
 Đăng ký
Tác giả: Heo Còi
Thu gọn cột thông tin

[Plugin Discuz] Plugin Discuz! New Toplist for 7.0 3 in 1

[Lấy địa chỉ]
  • Tâm trạng hàng ngày
    Hạnh phúc
    2-7-2025 09:43 PM
  • Đã viết: 13 ngày

    [LV.3]Spam 3

    Đăng lúc 9-1-2009 11:53 AM | Xem tất
    gì thế KTV
    Đăng lúc 22-1-2009 11:24 AM | Xem tất
    Update cái này nữa coi như gần đẹp cái rum ^^
    Đăng lúc 22-1-2009 11:54 AM | Xem tất
    1. //----Toplist
    2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
    3. //The new paste
    4. $hack_cut_str = 50; //The number of words in the title
    5. $hack_cut_strauthor = 9;
    6. $new_post_threadlist = array();
    7. $nthread = array();
    8. $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.dateline DESC LIMIT 0, 10");
    9. while($nthread = $db->fetch_array($query)) {
    10. $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
    11. $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
    12. $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
    13. $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
    14. $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
    15. if($nthread['highlight']) {
    16. $string = sprintf('%02d', $nthread['highlight']);
    17. $stylestr = sprintf('%03b', $string[0]);
    18. $nthread['highlight'] = 'style="';
    19. $nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
    20. $nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
    21. $nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
    22. $nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
    23. $nthread['highlight'] .= '"';
    24. } else {
    25. $nthread['highlight'] = '';
    26. }
    27. $new_post_threadlist[] = $nthread;
    28. }

    29. //New Reply
    30. $hack_cut_str = 50; //The number of words in the title
    31. $hack_cut_strauthor = 9;
    32. $new_reply_threadlist = array();
    33. $rthread = array();
    34. $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.lastpost DESC LIMIT 0, 10");
    35. while($rthread = $db->fetch_array($query)) {
    36. $rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
    37. $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
    38. $rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
    39. $rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
    40. $rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
    41. if($rthread['highlight']) {
    42. $string = sprintf('%02d', $rthread['highlight']);
    43. $stylestr = sprintf('%03b', $string[0]);
    44. $rthread['highlight'] = 'style="';
    45. $rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
    46. $rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
    47. $rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
    48. $rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
    49. $rthread['highlight'] .= '"';
    50. } else {
    51. $rthread['highlight'] = '';
    52. }
    53. $new_reply_threadlist[] = $rthread;
    54. }

    55. //Heat Tie
    56. $hack_cut_str = 50; //The number of words in the title
    57. $hack_cut_strauthor = 9;
    58. $new_hot_threadlist = array();
    59. $mthread = array();
    60. $ctime=$timestamp-3600*24*7;//7 is the last number of days for this week
    61. $query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 AND t.dateline>$ctime AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
    62. while($mthread = $db->fetch_array($query)) {
    63. $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
    64. $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
    65. $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
    66. $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
    67. $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
    68. if($mthread['highlight']) {
    69. $string = sprintf('%02d', $mthread['highlight']);
    70. $stylestr = sprintf('%03b', $string[0]);
    71. $mthread['highlight'] = 'style="';
    72. $mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
    73. $mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
    74. $mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
    75. $mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
    76. $mthread['highlight'] .= '"';
    77. } else {
    78. $mthread['highlight'] = '';
    79. }
    80. $new_hot_threadlist[] = $mthread;
    81. }

    82. //Today ranking post
    83. $tomonth=date(n);
    84. $todate=date(j);
    85. $toyear=date(Y);
    86. $time=mktime(0,0,0,$tomonth,$todate,$toyear);
    87. $query=$db->query("select count(pid) as num,authorid,author from $tablepre"."posts where dateline>=$time group by authorid order by num desc limit 0,10");
    88. while($result=$db->fetch_array($query)){
    89. $poststar.="<a href=space.php?uid=".$result[authorid].">".cutstr($result[author],8)."</a><font color=red>[".$result[num]."]</font>";
    90. }
    91. //----Toplist
    Sao chép mã



    Post kỹ lại khúc này!
    Đăng lúc 24-1-2009 07:57 PM | Xem tất
    Dizcu.htm ở thư mục nào vậy
  • Tâm trạng hàng ngày
    Hạnh phúc
    2-7-2025 09:43 PM
  • Đã viết: 13 ngày

    [LV.3]Spam 3

    Đăng lúc 24-1-2009 09:58 PM | Xem tất
    chú ý discuz chỉ có các file .htm trong template/default thôi nhé
    Đăng lúc 9-2-2009 01:11 AM | Xem tất
    Cài đúng rồi sao không hiện lên SB nhỉ ? Các chức năng khác thì hiện lên rồi nhưng mỗi SB thì không thấy đâu .
  • Tâm trạng hàng ngày
    Hạnh phúc
    2-7-2025 09:43 PM
  • Đã viết: 13 ngày

    [LV.3]Spam 3

    Đăng lúc 9-2-2009 08:28 AM | Xem tất
    đã vào admincp set cho nó hiện chưa.. Enable ..
    set thêm permission cho các nhóm nữa
    Đăng lúc 9-2-2009 06:19 PM | Xem tất

    Cần phải set thêm gì vậy nữa SK ? Vào admincp rồi vào mục nào để enable nó vậy ? Hướng dẫn mình cụ thể được không ?
  • Tâm trạng hàng ngày
    Suy ngẫm
    22-4-2024 05:18 PM
  • Đã viết: 4 ngày

    [LV.2]Spam 2

     Tác giả| Đăng lúc 9-2-2009 06:25 PM | Xem tất
    Vào Extended/Plugin rồi kick vào phần Plugin shoutbox khác thấy các phần setting permission
    Nhớ phải chạy cài đặt cho sb nữa
    Đăng lúc 9-2-2009 06:30 PM | Xem tất
    Mình cài đặt rồi nhưng vẫn không hiện . Bạn thử vào site coi giúp mình được không ?
    http://na37.org . Nó không hiển thị được ở index . Cài SB riêng thì hiển thị được nhưng khi cài cái này vào thì không . SB chỉ hiển thị khi click vào link http://na37.org/plugin.php?ident ... amp;module=shoutbox
    Bạn phải đăng nhập mới được đăng bài Đăng nhập | Đăng ký

    Quy tắc điểm

    Đóng

    Thông báoTrước /1 Sau

    Phòng tối|Lưu trữ|Diễn đàn Yên Bái 2024 Community Guidelines |

    GMT+7, 22-10-2026 08:12 AM , Processed in 0.018864 second(s), 16 queries .

    Powered by Discuz! X3.4

    © 2001-2013 Comsenz Inc.

    Trả lời nhanh Lên trên Trở lại danh sách