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
ดู: 7005|ตอบกลับ: 17

[A/M/H6.1] Toplist Classic (Poppular)6.1.0 (SEO)

[คัดลอกลิงก์]
acaz โพสต์ 2008-6-3 18:41:41 |โหมดอ่าน
รายละเอียด : Toplist แบบฉบับคลาสสิคที่คนนิยมใช้กันมากที่สุด
เจ้าของ : benba ( http://www.discuz.net/viewthread ... %26amp%3Btypeid%3D2 )
ภาษาไทย : acaz ( http://www.cazdesign.com/forums/index.php )
ปรับปรุงล่าสุด : แก้ไขเรื่องการติดตั้งแล้วรูปไม่แสดง
ไฟลล์ที่ต้องแก้ไข : index.php, discuz.htm
ไฟลล์ที่เพิ่มเข้ามา : pic.php

ตัวอย่างเมื่อทำเสร็จ :


How To Install
1. Download Toplist Classic (Poppular)6.1.0 (SEO) ราคา 1 บาท มาๆมาโหลดๆ ~:[smilies_(1)]:~


2. แตกไฟลล์ Toplist(Poppular)6.1.0.rar
สำหรับ Discuz ที่ยังไม่มีการแก้ไขอะไรเลย
อัพโหลดขึ้นตามตำแหน่งต้นฉบับใช้งานได้

---------------------------------------------------
สำหรับคนที่ปรับแต่ง Discuz มาบ้างแล้ว

1. Download Toplist Classic (Poppular)6.1.0 (SEO)

2. แตกไฟลล์ Toplist(Poppular)6.1.0.rar
อัพโหลดไฟลล์ pic.php ขึ้นตามตำแหน่งต้นฉบับ
อัพโหลดไฟลล์ Images ขึ้นตามตำแหน่งต้นฉบับ

3. เปิดไฟลล์ index.php
ค้นหา

  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
คัดลอกไปที่คลิปบอร์ด
เพิ่มโค๊ดนี้ในบรรทัดต่อไป

  1. //----Toplist
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. //โพสใหม่
  4. $hack_cut_str = 26; //ความยาวของหัวข้อ
  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 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. //ตอบใหม่
  30. $hack_cut_str = 26; ///ความยาวของหัวข้อ
  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.displayorder not in (-1,-2) AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 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 = 26; ///ความยาวของหัวข้อ
  57. $hack_cut_strauthor = 9;
  58. $new_hot_threadlist = array();
  59. $mthread = array();
  60. $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.replies DESC LIMIT 0, 10");
  61. while($mthread = $db->fetch_array($query)) {
  62.         $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
  63.         $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
  64.         $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
  65.                 $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
  66.         $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread[lastpost] + ($timeoffset * 3600));
  67.         if($mthread['highlight']) {
  68.                 $string = sprintf('%02d', $mthread['highlight']);
  69.                 $stylestr = sprintf('%03b', $string[0]);
  70.                 $mthread['highlight'] = 'style="';
  71.                 $mthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
  72.                 $mthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
  73.                 $mthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
  74.                 $mthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
  75.                 $mthread['highlight'] .= '"';
  76.         } else {
  77.                 $mthread['highlight'] = '';
  78.         }
  79.         $new_hot_threadlist[] = $mthread;
  80. }
  81. //----Toplist
คัดลอกไปที่คลิปบอร์ด
3. เปิดไฟลล์ discuz.htm ใน สกินที่คุณใช้งาน
ค้นหา

  1. <!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['text'])}--><div class="ad_text" id="ad_text"><table summary="Text Ad" cellpadding="0" cellspacing="1">$advlist[text]</table></div><!--{else}--><div id="ad_text"></div><!--{/if}-->
คัดลอกไปที่คลิปบอร์ด
เพิ่มโค๊ดนี้ในบรรทัดต่อไป

  1. <!-- Toplist -->
  2. <div class="mainbox forumlist" style="padding:0;">
  3.         <table cellspacing="0" cellpadding="0">
  4.                 <thead class="category">
  5.                 <tr>
  6.                         <td align="center" style="padding:0 1px 0 0"><h3>[ รูปจากกระดาน ]</h3></td>
  7.                         <td align="center" style="padding:0"><h3>[ โพสใหม่ ]</h3></td>
  8.                         <td align="center" style="padding:0 1px 0 1px"><h3>[ ตอบล่าสุด ]</h3></td>
  9.                         <td align="center" style="padding:0"><h3>[ หัวข้อเด่น ]</h3></td>
  10.                 </tr>
  11.                 </thead>
  12.                 <tr>
  13.                         <td width="25%">
  14.                                 <script type="text/javascript" src="pic.php"></script>
  15.                         </td>
  16.                         <td width="25%">
  17.                                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
  18.                                         <tr valign="top">
  19.                                                 <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  20.                                                 <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  21.                                                 <!--{loop $new_post_threadlist $nthread}-->
  22.                                                         <!--{if $nthread[replies]}-->
  23.                                                                 <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='หัวข้อใหม่ {LF}กระดาน: $nthread[forumname]{LF}ชื่อกระทู้: $nthread[subject] {LF}โพสโดย: $nthread[author]{LF}โพสเมื่อ: $nthread[date]{LF}ดูแล้ว: $nthread[views] คน {LF}ตอบแล้ว: $nthread[replies] คน{LF}ตอบล่าสุด: $nthread[lastreplytime]{LF}{lang lastpost}: $nthread[lastposter]'>$nthread[view_subject]</a></div>
  24.                                         <!--{else}-->
  25.                                                                 <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$nthread[tid]" $nthread['highlight'] title='หัวข้อใหม่ {LF}กระดาน: $nthread[forumname]{LF}ชื่อกระทู้: $nthread[subject] {LF}โพสโดย: $nthread[author]{LF}โพสเมื่อ: $nthread[date]{LF}ดูแล้ว: $nthread[views] คน {LF}ตอบแล้ว: $nthread[replies] คน{LF}ตอบล่าสุด: ไม่มี'>$nthread[view_subject]</a></div>
  26.                                                         <!--{/if}-->
  27.                                                 <!--{/loop}-->
  28.                                                 </td>
  29.                                         </tr>
  30.                                 </table>
  31.                         </td>
  32.                         <td width="25%">
  33.                                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
  34.                                         <tr valign="top">
  35.                                                 <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  36.                                                 <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  37.                                                 <!--{loop $new_reply_threadlist $rthread}-->
  38.                                                         <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$rthread[tid]" $rthread['highlight'] title='ตอบ {LF}กระดาน: $rthread[forumname]{LF}ชื่อกระทู้: $rthread[subject]{LF}โพสโดย: $rthread[author]{LF}โพสเมื่อ: $rthread[date]{LF}ดูแล้ว: $rthread[views] คน{LF}ตอบแล้ว: $rthread[replies] คน{LF}ตอบล่าสุด: $rthread[lastreplytime]{LF}{lang lastpost}: $rthread[lastposter]'>$rthread[view_subject]</a></div>
  39.                                                 <!--{/loop}-->
  40.                                                 </td>
  41.                                         </tr>
  42.                                 </table>
  43.                         </td>
  44.                         <td width="25%">
  45.                                 <table border="0" cellpadding="0" cellspacing="0" width="100%">
  46.                                         <tr valign="top">
  47.                                                 <td width="24" style="padding:0;border-top:0px;"><img src="images/list.gif" border="0" /></td>
  48.                                                 <td background="images/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat-y" width="100%">
  49.                                                 <!--{loop $new_hot_threadlist $mthread}-->
  50.                                                         <div style="overflow: hidden;height: 20px;width: 100%;"><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title='หัวข้อเด่นประจำสัปดาห์ {LF}กระดาน: $mthread[forumname]{LF}ชื่อกระทู้: $mthread[subject]{LF}โพสโดย: $mthread[author]{LF}โพสเมื่อ: $mthread[date]{LF}ดูแล้ว: $mthread[views] คน{LF}ตอบแล้ว: $mthread[replies] คน{LF}ตอบล่าสุด: $mthread[lastreplytime]{LF}{lang lastpost}: $mthread[lastposter]'>$mthread[view_subject]</a></div>
  51.                                                 <!--{/loop}-->
  52.                                                 </td>
  53.                                         </tr>
  54.                                 </table>
  55.                         </td>
  56.                 </tr>
  57.         </table>
  58. </div>
  59. <!-- Toplist -->

คัดลอกไปที่คลิปบอร์ด
4. ไฟลล์ index.php ใน archiver จะใช้ก็ได้ไม่ใช้ก็ได้

เรียบร้อยครับอัพเดทแคชแล้วทดสอบ

หมายเหตุ : ผมไม่ได้ใช้ไฟลล์ index.php ใน archiver เนื่องจากมีการลบ meta name="copyright" ออก
ซึ่งมันเป็นของ comsenz ถ้าไม่ซีเรียสเรื่อง SEO
ขอบคุณที่กติดตามมาโดยตลอด ~(24)~

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

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

x
buachompoox โพสต์ 2008-6-3 19:35:39
ขอบคุณงับ คลาสสิคสมชื่อ จริงๆ อิๆ
tae861 โพสต์ 2008-6-3 19:41:08
คนที่ 2 ครับหานานแล้วสำหรับ 6.1
bglite โพสต์ 2008-6-18 21:12:38
ขอบคุณครับ
UnCLeTOnn โพสต์ 2008-6-28 11:54:51
ขอบคุณครับ
Uthen โพสต์ 2008-6-28 12:33:56
Thank you so very very much na krub!:)
Oasis โพสต์ 2008-7-14 23:02:24

Toplist

:)   ขอบคุณมากคร๊าป Admin  สังคมแห่งการแบ่งปัน
ttb5 โพสต์ 2008-7-17 09:43:46

ขอบคุณมากคับ

ขอบคุณสำหรับคำแนะนำดีดี
mustwillza โพสต์ 2008-8-3 10:00:14
ขอบคุณมากๆ ครับ กำลังต้องการ
Ibueee โพสต์ 2008-8-28 17:59:55
รูปไม่ขึ้นอะครับพี่ ช่วยหน่อยคับ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

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

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

GMT+7, 2024-5-18 06:03

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

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