Discuz Thai

 ลืมรหัสผ่าน
 สมัครสมาชิก

ข้อตกลงการใช้งานกระดานข่าวดิสคัสไทย DiscuzThai Agreement (English Version) ประกาศดิสคัสไทย - ทำเนียบดิสคัสภาษาไทย

Discuz! X3.5 Thai R20231001 Rev.8 (NEW) [วิดีโอช่วยสอน] อัปเกรด Discuz! X3.4 เป็น X3.5 Discord ของ Discuz! Thai Community อย่างเป็นทางการ

Discuz! X3.4 Thai R20220811 (REV.75) สิ้นสุดการสนับสนุน Discuz! X3.4 ภาษาไทยตั้งแต่วันนี้เป็นต้นไป (ขอแนะนำให้อัปเกรดเป็น X3.5 แทน)

ค้นหา
แท็กยอดนิยม: ดิสคัสภาษาไทย Discuz Thai
ดู: 1506|ตอบกลับ: 6

[Discuz6.1] Toplist ไม่แสดงอะไรเลยทำไง

[คัดลอกลิงก์]
pannatatm โพสต์ 2008-7-13 11:04:01 |โหมดอ่าน

โพสแล้ว มีแล้ว แต่ไม่ยองโชว์

ขออภัย! โพสต์นี้มีไฟล์แนบหรือรูปภาพที่ไม่ได้รับอนุญาตให้คุณเข้าถึง

คุณจำเป็นต้อง ลงชื่อเข้าใช้ เพื่อดาวน์โหลดหรือดูไฟล์แนบนี้ คุณยังไม่มีบัญชีใช่ไหม? สมัครสมาชิก

x
nccatman โพสต์ 2008-7-15 10:22:59
อ้ะ เป็นเหมือนกันเรยครับเนี่ย
panakorn โพสต์ 2008-7-25 15:07:57
เหมือนกันเลยครับ ใครรู้ช่วยเราที
bunnachart โพสต์ 2008-7-29 18:25:13
เปิดไฟล์ index.php
ค้นหา
  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
คัดลอกไปที่คลิปบอร์ด
ใส่ต่อบรรทัดล่าง
  1. //----เริ่มทำงาน windtoplist
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. //กระทู้ล่าสุด
  4. $hack_cut_str = 70; //ความยาวของ กระทู้ที่จะให้แสดง
  5. $hack_cut_strauthor = 10;
  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");//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. //ตอบกลับล่าสุด
  30. $hack_cut_str = 70; //ความยาวของ กระทู้ที่จะให้แสดง
  31. $hack_cut_strauthor = 10;
  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. //กระทู้ร้อนแรง
  56. $hack_cut_str = 70; //ความยาวของ กระทู้ที่จะให้แสดง
  57. $hack_cut_strauthor = 10;
  58. $new_hot_threadlist = array();
  59. $mthread = array();


  60. $ctime=$timestamp-3600*24*7;
  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. //กระทู้สำคัญ
  83. $hack_cut_str = 70; //ความยาวของ กระทู้ที่จะให้แสดง
  84. $hack_cut_strauthor = 10;
  85. $new_digest_threadlist = array();
  86. $dthread = array();
  87. $dtime=$timestamp-3600*24*30;  
  88. $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>$dtime AND t.digest in (1,2,3) AND f.fid not in (0) AND t.displayorder not in (-1,-2) ORDER BY t.replies DESC LIMIT 0, 10");
  89. while($dthread = $db->fetch_array($query)) {
  90.         $dthread['forumname'] = ereg_replace('<[^>]*>','',$dthread['name']);
  91.         $dthread['view_subject'] = cutstr($dthread['subject'],$hack_cut_str);
  92.         $dthread['view_lastposter'] = cutstr($dthread['lastposter'],$hack_cut_strauthor);
  93.                 $dthread['date']= gmdate("$dateformat $timeformat", $dthread['dateline'] + $timeoffset * 3600);
  94.         $dthread['lastreplytime']= gmdate("$dateformat $timeformat", $dthread[lastpost] + ($timeoffset * 3600));
  95.         if($dthread['highlight']) {
  96.                 $string = sprintf('%02d', $dthread['highlight']);
  97.                 $stylestr = sprintf('%03b', $string[0]);
  98.                 $dthread['highlight'] = 'style="';
  99.                 $dthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  100.                 $dthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  101.                 $dthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  102.                 $dthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  103.                 $dthread['highlight'] .= '"';
  104.         } else {
  105.                 $dthread['highlight'] = '';
  106.         }
  107.         $new_digest_threadlist[] = $dthread;
  108. }
  109. //แสดงรายชื่อสมาชิก โพสสูงสุด
  110. $today = array();
  111. $query = $db->query("SELECT uid, username, posts FROM {$tablepre}members ORDER BY posts DESC LIMIT 10");
  112. while($variable = $db->fetch_array($query)) {
  113.         $today[] = array('uid'=>$variable['uid'], 'username'=>$variable['username'], 'posts'=>$variable[posts]);
  114. }

  115. // ถ้าเป็นหน้าขาวให้คอมเม้น ปิดทั้งหมดไว้ โดยใส่ /* ข้อความ */ คร่อมทั้งหมด จากบรรทัดนี้ลงไป
  116. // ตัวแปลเข้าไปเรียก OS, บราเซอร์ if(!$statstatus && $discuz_uid){
  117. require_once DISCUZ_ROOT.'./include/counter.inc.php';
  118. }
  119. require_once DISCUZ_ROOT.'./include/misc.func.php';
  120. $mem_home = convertip($onlineip, $datadir = "./");
  121. require_once DISCUZ_ROOT.'./forumdata/cache/cache_todayvisit.php';
  122. $todayvisit=$_DCACHE['todayvisit']['0']['COUNT(*)'] ;
  123. @include './forumdata/cache/cache_newtopic.php';
  124. @include './forumdata/cache/cache_newreply.php';

  125. //----จบ windtoplist
คัดลอกไปที่คลิปบอร์ด
ถ้าใส่แล้วเป้นหน้าขาวไม่แสดงเว็บเพจ ให้ทำการปิด โค้ด ตรงที่เป็นสีแดงไว้ก่อน
ลองดูนะครับ

[ แก้ไขล่าสุด bunnachart เมื่อ 2008-7-29 18:27 ]
sakang โพสต์ 2008-8-7 14:34:03
ใน index มีแค่นี้อ่ะครับ

<?php

/*
        [Discuz!] (C)2001-2007 Comsenz Inc.
        This is NOT a freeware, use is subject to license terms

        $Id: index.php 10486 2007-09-03 06:53:29Z liuqiang $
*/

define('CURSCRIPT', 'index');

require_once './include/common.inc.php';
if($_DCACHE['settings']['aggregation'] == '1') { //note ละถฯสวท๑ษ่ึรHOMEฮชสืาณ
        require_once 'home.php';
} else {
        require_once 'forums.php';
}

?>
sakang โพสต์ 2008-8-7 15:25:34
กระทู้ล่าสุด
ตอบล่าสุด ไม่ทำงานอ่ะครับ ทำไงดี ช่วยหน่อยครับ
bunnachart โพสต์ 2008-8-7 16:15:18
ต้นฉบับโพสโดย sakang เมื่อ 2008-8-7 14:34
ใน index มีแค่นี้อ่ะครับ


6.0 หรือเปล่าครับ ถ้าใช้ไปดูใน โฟลเดอร์ Forum ครับ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

รายละเอียดเครดิต

รายชื่อผู้กระทำผิด|Archiver|ดิสคัส ไทย Follow us: Become a fan on facebook. Follow us on Twitter.

GMT+7, 2024-5-19 06:14

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้