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
เจ้าของ: buachompoox

[สกิน6.1] All Skins Artery _DZ6.1 29/07/2008

[คัดลอกลิงก์]
veverman โพสต์ 2008-6-30 11:41:58
แก้ไขให้ 5 กระทู้ล่าสุดโชว์สีกระทู้ที่เน้น




แก้ไขไฟล์  index.php หาโค้ด คัดลอกไปที่คลิปบอร์ด

  1. $hack_cut_str =60;
  2. $fids = array();
  3. if (file_exists("./forumdata/cache/cache_forums.php")){
  4.         require_once "./forumdata/cache/cache_forums.php";
  5.         if (is_array($_DCACHE['forums'])){
  6.                 foreach ($_DCACHE['forums'] as $k => $v){
  7.                 if (!strstr(',sub,forum,',','.$v['type'].',')) continue;
  8.                         $fids[$k] = 5;
  9.                 }
  10.         }
  11. }
  12. if (count($fids) < 1){
  13.         $query = $db->query("SELECT fid FROM {$tablepre}forums WHERE type='forum' OR type='sub'");
  14.         while ($row = $db->fetch_array($query)){
  15.                 $fids[$row['fid']] = 5;
  16.         }
  17. }
  18. $limit_counts = 0;

  19. foreach ($fids as $k => $v){
  20.         $sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT $v) UNION ";
  21. }
  22. if ($sql){
  23.         $sql = substr($sql,0,strlen($sql)-6);
  24. }
  25. $query = $db->query($sql);
  26. while ($row = $db->fetch_array($query)){
  27.         $row['view_subject'] = cutstr($row['subject'],$hack_cut_str);
  28.         $row['date']= gmdate("$dateformat", $row['dateline'] + $timeoffset * 3600);
  29.         ${'new_no'.$row['fid'].'_threadlist'}[] = $row;
  30. }
คัดลอกไปที่คลิปบอร์ด

เปลี่ยนเป็น
คัดลอกไปที่คลิปบอร์ด
  1. //??????--??
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. $hack_cut_str =60; // ????????
  4. $fids = array();
  5. if (file_exists("./forumdata/cache/cache_forums.php")){
  6.         require_once "./forumdata/cache/cache_forums.php";
  7.         if (is_array($_DCACHE['forums'])){
  8.                 foreach ($_DCACHE['forums'] as $k => $v){
  9.                 if (!strstr(',sub,forum,',','.$v['type'].',')) continue;
  10.                         $fids[$k] = 5; // ?????????????????????
  11.                 }
  12.         }
  13. }
  14. if (count($fids) < 1){
  15.         $query = $db->query("SELECT fid FROM {$tablepre}forums WHERE type='forum' OR type='sub'");
  16.         while ($row = $db->fetch_array($query)){
  17.                 $fids[$row['fid']] = 5; // ?????????????????????
  18.         }
  19. }
  20. $limit_counts = 0;

  21. foreach ($fids as $k => $v){
  22.         $sql .= "(SELECT t.*, f.name FROM {$tablepre}threads t LEFT JOIN {$tablepre}forums f ON f.fid = t.fid WHERE t.fid='$k' AND t.closed NOT LIKE 'moved|%' AND t.displayorder>=0 ORDER BY t.dateline DESC LIMIT $v) UNION ";
  23. }
  24. if ($sql){
  25.         $sql = substr($sql,0,strlen($sql)-6);
  26. }
  27. $query = $db->query($sql);
  28. while ($row = $db->fetch_array($query)){
  29.         $row['view_subject'] = cutstr($row['subject'],$hack_cut_str);
  30.         $row['date']= gmdate("$dateformat", $row['dateline'] + $timeoffset * 3600);
  31.         if($row['highlight']) {
  32.                         $string = sprintf('%02d', $row['highlight']);
  33.                         $stylestr = sprintf('%03b', $string[0]);
  34.                         $row['highlight'] = 'style="';
  35.                         $row['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  36.                         $row['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  37.                         $row['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  38.                         $row['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  39.                         $row['highlight'] .= '"';
  40.         } else {
  41.                         $row['highlight'] = '';
  42.         }
  43.         ${'new_no'.$row['fid'].'_threadlist'}[] = $row;
  44. }
  45. //??????--??
คัดลอกไปที่คลิปบอร์ด



ตัวนี้ทำงัย ทำตามแล้ว ไม่เห็นได้เลย

[ แก้ไขล่าสุด veverman เมื่อ 2008-6-30 11:46 ]
kookcoo โพสต์ 2008-6-30 15:43:55
สวยๆทั้งนั้นเลย ขอบคุณมากๆเลยครับ
แบนรูปโปรไฟล์
ssss โพสต์ 2008-7-20 19:20:16
หมายเหตุ: กระทู้นี้ถูกแบนห้ามไม่ให้เผยแพร่ต่อสาธารณะ
reeppo โพสต์ 2008-8-12 13:03:41
หุหุหุแหล่มมากมาย
mrbigbom โพสต์ 2008-8-21 22:43:32

0.0

เด็กใหม่อะก๊าบ อยากได้ยัง
ThaiAnime โพสต์ 2008-8-22 02:18:20
ไม่ทราบว่าถ้าจะใส่ shoutbox แทรก code ไว้ตรงไหนคะ? แทรกตำแหน่งเดิมแล้วใช้ไม่ได้อ่ะ
runjang โพสต์ 2008-9-3 10:37:58
:)  ขอบคุณครับ
yodaji โพสต์ 2008-11-5 23:59:39
ขอบคุณครับ ว่าแต่ต้องเอาไปลงตรงไหนครับ
KhanX โพสต์ 2008-11-6 05:25:37
ขอบคุณครับ
noise007 โพสต์ 2009-1-13 02:36:16
ขอบบุญขอบคุณ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

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

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

GMT+7, 2024-4-24 20:29

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

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