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

[A/M/H6.1] [Bug Fix] SATILing Toplist สำหรับ 6.1 ครับ ( 8-06-2008)

[คัดลอกลิงก์]
mastergtx โพสต์ 2008-6-8 10:06:54 |โหมดอ่าน
  Style name SATILing Toplist สำหรับ 6.1
  Applicable version Discuz 6.1.0
  Language coding UTF-8
  Toplist by
SATILing
  Copyright com-bannok.com
  เมื่อ22 พ.ค. 2551
  Support site http://board.com-bannok.com/index.php




แก้ไขดังนี้ครับ
- ตัวสคริปต์ในส่วนของไฟล์ index.php เปลี่ยนทั้งแผง
- แก้รูปส่วนตัวให้แสดงในหน้าแรกแล้วครับตัวอย่าง
- ใส่เส้นให้มันดูดีขึ้นดังรูป
- และอื่นๆ

อัพโหลดไฟล์ดังนี้
/pic.php
/templates/xxx
/images/focus.swf
/images/listbg_li.gif
/images/rank.gif
/images/xxx

แกไขไฟล์ ควรแบ็คอัพไว้ก่อนกันเดี้ยง เปิดไฟล์ index.php แล้วหา
  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
คัดลอกไปที่คลิปบอร์ด
วางโค้ดนี้ด้านล้างครับ
  1. //----start SATILing
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. //????
  4. $hack_cut_str = 20; //????????
  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. //??????
  30. $hack_cut_str = 20; //????????
  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. //????
  56. $hack_cut_str = 20; //????????
  57. $hack_cut_strauthor = 9;
  58. $new_hot_threadlist = array();
  59. $mthread = array();
  60. $ctime=$timestamp-3600*24*7;//????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. $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.="<div style="overflow: hidden;height: 20px;width: 100%;"><a href=space.php?uid=".$result[authorid].">".cutstr($result[author],8)."</a><font color=red>[".$result[num]."]</font></div>";
  90. }
  91. //----End SATILing
คัดลอกไปที่คลิปบอร์ด
Save

เปิดไฟล์ header.htm ของสกินที่คุณใช้ ขึ้นมาแล้วหา
  1. <script type="text/javascript" src="include/javascript/common.js"></script>
คัดลอกไปที่คลิปบอร์ด
วางโค้ดนี้ด้านบนครับ
  1. <link href="{IMGDIR}/css.css" rel="stylesheet" type="text/css" />
คัดลอกไปที่คลิปบอร์ด
หา
  1. </head>
คัดลอกไปที่คลิปบอร์ด
วางโค้ดนี้ด้านบนครับ
  1. <style type="text/css">
  2. .style5 {
  3.     border-collapse: collapse;
  4.     background-image: url('{IMGDIR}/foot.jpg');}
  5. .style6 {
  6.     border-collapse: collapse;}
  7. .style7 {
  8.     text-align: left;
  9.     background-image: url('{IMGDIR}/1.png');}
  10. .style8 {
  11.     text-align: center;
  12.     background-image: url('{IMGDIR}/3.png');}
  13. .style9 {
  14.     text-align: right;
  15.     background-image: url('{IMGDIR}/2.png');}
  16. </style>
  17. <script language="javascript">
  18. function setTab(area,id) {
  19.     var tabArea=document.getElementById(area);

  20.     var contents=tabArea.childNodes;
  21.     for(i=0; i<contents.length; i++) {
  22.         if(contents.className=='tabcontent'){contents.style.display='none';}
  23.     }
  24.     document.getElementById(id).style.display='';

  25.     var tabs=document.getElementById(area+'tabs').getElementsByTagName('span');
  26.     for(i=0; i<tabs.length; i++) { tabs.className=''; }
  27.     document.getElementById(id+'tab').className='active';
  28. }
  29. </script>
คัดลอกไปที่คลิปบอร์ด
เปิดไฟล์ css_common.htm ของสกินที่คุณใช้ ขึ้นมาแล้วหา
  1. #threadtypes table td, #threadtypes table th { border-top: 1px solid {BGBORDER}; border-bottom: 0;}
คัดลอกไปที่คลิปบอร์ด
วางโค้ดนี้ด้านล้างครับ
#button1 { border-style: solid; border-width: 0; background: url(images/dz_back/login_lo.gif); width:61px; height:63px; }
#button2 { border-style: solid; border-width: 0; background: url(images/dz_back/login_lo1.gif); width:54px; height:63px; }
images/dz_back/login_lo.gif :: เปลี่ยนให้ตรงกับโฟลเดอร์สกินของคุณใช้

เปิดไฟล์ 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}-->
คัดลอกไปที่คลิปบอร์ด
วางโค้ดนี้ด้านล้างครับ
<div style="border:1px solid {BORDERCOLOR};  margin-top:10px; margin-bottom:5px; padding-bottom:10px"
>
<div style=" background:url(images/wind/header_bg.gif) ; height:31px">
<span class="headactions">
               
        
<img id="category_toplist_img" src="{IMGDIR}/collapsed_no.gif" title="{lang spread}"

alt="{lang spread}" />
        </span>
<span class="headactions"><b><a href="http://www.tmd.go.th/index.php" target="bank_"><font color=#375368>สภาพอากาศวันนี้</font></a></b></span>      
<h3 style="padding-top:6px"><font color=#375368>    สถิติของกระดานข่าว และรูปจากกระดาน</font></h3>      

</div>
<div  style="height:241px; padding-top:3px" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding-right:5px; padding-left:4px">
    <div id="hotarticle" style="width:350px; float:left; height:auto">
                        <p id="hotarticletabs">
                        
                        <span id="rggtab" style="margin-right:0px">         
<img src="{IMGDIR}/a04.gif" align="absmiddle"/>ประกาศ</span>
                        
                        <span id="rjstab">
                <img src="{IMGDIR}/a03.gif" align="absmiddle"/>เมนูสมาชิก</span>
                        
                        <span id="rhdtab" class="active">  <img
src="{IMGDIR}/a02.gif" align="absmiddle"/>รูปจากกระดาน</span>

                        
                        </p>
                        
                        <h3 style="margin-left:1px">¡¡</h3>
                        <ul id="rhd" class="tabcontent" style="border:1px solid #9DB3C5;
border-top:none;margin-left:1px;">
<script type="text/javascript" src="pic.php"></script>
                        </ul>
                        <ul id="rjs" class="tabcontent" style="display: none;border:1px solid #9DB3C5;
border-top:none;margin-left:1px">
{template index_dl}
                        </ul>
                        <ul id="rgg" class="tabcontent" style="display: none;border:1px solid #9DB3C5;
border-top:none;margin-left:1px ">

{template index_gg}
                        </ul>
        </div></td>
    <td width="100%">
    <div style="float:right; height:auto;padding-top:0px; width:100%">
<table  align="right" width="100%" border="0" cellpadding="0" >
  <tr>
    <td width="33%">{template new}</td>
    <td width="33%">{template rep}</td>

    <td width="33%" style="padding-right:5px">{template hot}</td>
  </tr>
</table>
</div></td>
  </tr>
</table>
</div>
</div>
========================================

อธิบายวิธีติดตั้งละเอียดนิดนึง หวังว่าจะเข้าใจมากขึ้นนะ

อัพโหลดไฟล์ไปไว้ที่โฟลเดอร์ของสกิน ที่ตรงกับการแก้ไขไฟล์ของสกินนั้นๆ นะครับ เรียบร้อยอัพเดทแคช

[ แก้ไขล่าสุด mastergtx เมื่อ 2008-6-8 10:22 ]

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

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

x

คะแนน

จำนวนผู้เข้าร่วม 1จิตพิศัย +10 ย่อ เหตุผล
acaz + 10 ยอดเยี่ยม

ดูบันทึกคะแนน

acaz โพสต์ 2008-6-8 10:17:40
ขอบคุณมากครับผม
 เจ้าของ| mastergtx โพสต์ 2008-6-8 10:30:53
-*-

ข้างบนเป็นตัวติดตั้งใหม่ สำหรับแก้บัคคนที่เล่นก่อนหน้านี้แล้ว แก้ 2 จุดเองคือ
- index_dl.htm เปิดไฟล์ขึ้นมาหา
<A href="memcp.php?action=profile&typeid=4" border="0" height="50" title="แก้ไขข้อมูลส่วนตัว" align="absmiddle" id="avatarlogin">$avatar</A>
เปลี่ยนเป็น
<A href="memcp.php?action=profile&typeid=4" border="0" height="50" title="แก้ไขข้อมูลส่วนตัว" align="absmiddle" id="avatarlogin"><img src="{echo discuz_uc_avatar($discuz_uid)}"/></A>
- discuz.htm หา
  1. <div id="blank" style="height:245px">
  2. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  3.   <tr>
  4.     <td style="padding-right:5px"><div id="hotarticle" style="width:350px; float:left; height:auto">
  5.             <p id="hotarticletabs">
  6.             
  7.             <span id="rggtab" onMouseOver="setTab('hotarticle','rgg')" style="margin-right:0px">     <img src="{IMGDIR}/a04.gif" align="absmiddle"/>กระทู้สำคัญ </span>
  8.             
  9.             <span id="rjstab" onMouseOver="setTab('hotarticle','rjs')">
  10.         <img src="{IMGDIR}/a03.gif" align="absmiddle"/>เมนูสมาชิก</span>
  11.             
  12.             <span id="rhdtab" class="active" onMouseOver="setTab('hotarticle','rhd')">  <img src="{IMGDIR}/a02.gif" align="absmiddle"/>รูปจากกระดาน</span>
  13.             
  14.             </p>
  15.             
  16.             <h3 style="margin-left:1px">¡¡</h3>
  17.             <ul id="rhd" class="tabcontent" style="border:1px solid #9db3c5; border-top:none;margin-left:1px;">
  18. <script type="text/javascript" src="pic.php"></script>
  19.             </ul>
  20.             <ul id="rjs" class="tabcontent" style="display: none;border:1px solid #9db3c5; border-top:none;margin-left:1px">
  21. {template index_dl}
  22.             </ul>
  23.             <ul id="rgg" class="tabcontent" style="display: none;border:1px solid #9db3c5; border-top:none;margin-left:1px ">

  24. {template index_gg}
  25.             </ul>
  26.     </div></td>
  27.     <td width="100%"><div style="float:right; height:auto;padding-top:0px; width:100%">
  28. <table  align="right" width="100%" border="0" cellpadding="0" >
  29.   <tr>
  30.     <td width="33%">{template new}</td>
  31.     <td width="33%">{template rep}</td>
  32.     <td width="33%">{template hot}</td>
  33.   </tr>
  34. </table>
  35. </div></td>
  36.   </tr>
  37. </table>
  38. </div>
คัดลอกไปที่คลิปบอร์ด
เปลี่ยนเป็น
<div style="border:1px solid {BORDERCOLOR};  margin-top:10px; margin-bottom:5px; padding-bottom:10px"
>
<div style=" background:url(images/wind/header_bg.gif) ; height:31px">
<span class="headactions">
               
        
<img id="category_toplist_img" src="{IMGDIR}/collapsed_no.gif" title="{lang spread}"

alt="{lang spread}" />
        </span>
<span class="headactions"><b><a href="http://www.tmd.go.th/index.php" target="bank_"><font color=#375368>สภาพอากาศวันนี้</font></a></b></span>      
<h3 style="padding-top:6px"><font color=#375368>    สถิติของกระดานข่าว และรูปจากกระดาน</font></h3>      

</div>
<div  style="height:241px; padding-top:3px" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding-right:5px; padding-left:4px">
    <div id="hotarticle" style="width:350px; float:left; height:auto">
                        <p id="hotarticletabs">
                        
                        <span id="rggtab" style="margin-right:0px">         
<img src="{IMGDIR}/a04.gif" align="absmiddle"/>ประกาศ</span>
                        
                        <span id="rjstab">
                <img src="{IMGDIR}/a03.gif" align="absmiddle"/>เมนูสมาชิก</span>
                        
                        <span id="rhdtab" class="active">  <img
src="{IMGDIR}/a02.gif" align="absmiddle"/>รูปจากกระดาน</span>

                        
                        </p>
                        
                        <h3 style="margin-left:1px">¡¡</h3>
                        <ul id="rhd" class="tabcontent" style="border:1px solid #9DB3C5;
border-top:none;margin-left:1px;">
<script type="text/javascript" src="pic.php"></script>
                        </ul>
                        <ul id="rjs" class="tabcontent" style="display: none;border:1px solid #9DB3C5;
border-top:none;margin-left:1px">
{template index_dl}
                        </ul>
                        <ul id="rgg" class="tabcontent" style="display: none;border:1px solid #9DB3C5;
border-top:none;margin-left:1px ">

{template index_gg}
                        </ul>
        </div></td>
    <td width="100%">
    <div style="float:right; height:auto;padding-top:0px; width:100%">
<table  align="right" width="100%" border="0" cellpadding="0" >
  <tr>
    <td width="33%">{template new}</td>
    <td width="33%">{template rep}</td>

    <td width="33%" style="padding-right:5px">{template hot}</td>
  </tr>
</table>
</div></td>
  </tr>
</table>
</div>
</div>
เรียบร้อย

[ แก้ไขล่าสุด mastergtx เมื่อ 2008-6-8 10:32 ]
buachompoox โพสต์ 2008-6-8 10:34:17
ขอบคุณครับ
aueeua โพสต์ 2008-12-7 16:45:46
ขอบคุณมากครับ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

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

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

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

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

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