mastergtx โพสต์ 2008-5-22 12:06:49

SATILing Toplist สำหรับ 6.1 ครับ

http://bbs.com-bannok.com/attachments/month_0805/20080522_3e27f7bca3da9d14c255ZpMujWJcOPAn.gif

Style name SATILing Toplist สำหรับ 6.1Applicable version Discuz 6.1.0
Language coding UTF-8Toplist by
SATILingCopyright com-bannok.comเมื่อ22 พ.ค. 2551
Support site http://bbs.com-bannok.com/index.php

แก้ไขดังนี้ครับ
- ตัวสคริปต์ในส่วนของไฟล์ index.php เปลี่ยนทั้งแผง
- แสดงรูปภาพส่วนตัวเพี้ยน แก้เป็น <img src="{echo discuz_uc_avatar($bestmember_id['authorid'])}" border="0" alt="" /> มันก็ยังเพี้ยนเหมือนเดิม และเปลี่ยนเป็น http://bbs.com-bannok.com/ucenter/avatar.php?uid=1&size=small ก็ยังเพี้ยนเหมือนเดิม คือรูปที่แสดงเป็นรูป noavatar_middle.gif
- และอื่นๆ

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

แกไขไฟล์ ควรแบ็คอัพไว้ก่อนกันเดี้ยง เปิดไฟล์ index.php แล้วหา$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;วางโค้ดนี้ด้านล้างครับ//----start SATILing
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
//????
$hack_cut_str = 20; //????????
$hack_cut_strauthor = 9;
$new_post_threadlist = array();
$nthread = array();
$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");
while($nthread = $db->fetch_array($query)) {
      $nthread['forumname'] = ereg_replace('<[^>]*>','',$nthread['name']);
      $nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
      $nthread['view_author'] = cutstr($nthread['author'],$hack_cut_strauthor);
      $nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
      $nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread + ($timeoffset * 3600));
      if($nthread['highlight']) {
                $string = sprintf('%02d', $nthread['highlight']);
                $stylestr = sprintf('%03b', $string);
                $nthread['highlight'] = 'style="';
                $nthread['highlight'] .= $stylestr ? 'font-weight: bold;' : '';
                $nthread['highlight'] .= $stylestr ? 'font-style: italic;' : '';
                $nthread['highlight'] .= $stylestr ? 'text-decoration: underline;' : '';
                $nthread['highlight'] .= $string ? 'color: '.$colorarray[$string] : '';
                $nthread['highlight'] .= '"';
      } else {
                $nthread['highlight'] = '';
      }
      $new_post_threadlist[] = $nthread;
}

//??????
$hack_cut_str = 20; //????????
$hack_cut_strauthor = 9;
$new_reply_threadlist = array();
$rthread = array();
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fidAND 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");
while($rthread = $db->fetch_array($query)) {
      $rthread['forumname'] = ereg_replace('<[^>]*>','',$rthread['name']);
      $rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
      $rthread['view_lastposter'] = cutstr($rthread['lastposter'],$hack_cut_strauthor);
                $rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
      $rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread + ($timeoffset * 3600));
      if($rthread['highlight']) {
                $string = sprintf('%02d', $rthread['highlight']);
                $stylestr = sprintf('%03b', $string);
                $rthread['highlight'] = 'style="';
                $rthread['highlight'] .= $stylestr ? 'font-weight: bold;' : '';
                $rthread['highlight'] .= $stylestr ? 'font-style: italic;' : '';
                $rthread['highlight'] .= $stylestr ? 'text-decoration: underline;' : '';
                $rthread['highlight'] .= $string ? 'color: '.$colorarray[$string] : '';
                $rthread['highlight'] .= '"';
      } else {
                $rthread['highlight'] = '';
      }
      $new_reply_threadlist[] = $rthread;
}

//????
$hack_cut_str = 20; //????????
$hack_cut_strauthor = 9;
$new_hot_threadlist = array();
$mthread = array();
$ctime=$timestamp-3600*24*7;//????7????????????
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fidAND 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");
while($mthread = $db->fetch_array($query)) {
      $mthread['forumname'] = ereg_replace('<[^>]*>','',$mthread['name']);
      $mthread['view_subject'] = cutstr($mthread['subject'],$hack_cut_str);
      $mthread['view_lastposter'] = cutstr($mthread['lastposter'],$hack_cut_strauthor);
                $mthread['date']= gmdate("$dateformat $timeformat", $mthread['dateline'] + $timeoffset * 3600);
      $mthread['lastreplytime']= gmdate("$dateformat $timeformat", $mthread + ($timeoffset * 3600));
      if($mthread['highlight']) {
                $string = sprintf('%02d', $mthread['highlight']);
                $stylestr = sprintf('%03b', $string);
                $mthread['highlight'] = 'style="';
                $mthread['highlight'] .= $stylestr ? 'font-weight: bold;' : '';
                $mthread['highlight'] .= $stylestr ? 'font-style: italic;' : '';
                $mthread['highlight'] .= $stylestr ? 'text-decoration: underline;' : '';
                $mthread['highlight'] .= $string ? 'color: '.$colorarray[$string] : '';
                $mthread['highlight'] .= '"';
      } else {
                $mthread['highlight'] = '';
      }
      $new_hot_threadlist[] = $mthread;
}

//????????????
$tomonth=date(n);
$todate=date(j);
$toyear=date(Y);
$time=mktime(0,0,0,$tomonth,$todate,$toyear);
$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");
while($result=$db->fetch_array($query)){
      $poststar.="<div style=\"overflow: hidden;height: 20px;width: 100%;\"><a href=space.php?uid=".$result.">".cutstr($result,8)."</a><font color=red>[".$result."]</font></div>";
}
//----End SATILingSave

เปิดไฟล์ header.htm ขึ้นมาแล้วหา<script type="text/javascript" src="include/javascript/common.js"></script>วางโค้ดนี้ด้านบนครับ<link href="{IMGDIR}/css.css" rel="stylesheet" type="text/css" />หา</head>วางโค้ดนี้ด้านบนครับ<style type="text/css">
.style5 {
    border-collapse: collapse;
    background-image: url('{IMGDIR}/foot.jpg');}
.style6 {
    border-collapse: collapse;}
.style7 {
    text-align: left;
    background-image: url('{IMGDIR}/1.png');}
.style8 {
    text-align: center;
    background-image: url('{IMGDIR}/3.png');}
.style9 {
    text-align: right;
    background-image: url('{IMGDIR}/2.png');}
</style>
<script language="javascript">
function setTab(area,id) {
    var tabArea=document.getElementById(area);

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

    var tabs=document.getElementById(area+'tabs').getElementsByTagName('span');
    for(i=0; i<tabs.length; i++) { tabs.className=''; }
    document.getElementById(id+'tab').className='active';
}
</script>เปิดไฟล์ css_common.htm ขึ้นมาแล้วหา#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 หา<!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['text'])}--><div class="ad_text" id="ad_text"><table summary="Text Ad" cellpadding="0" cellspacing="1">$advlist</table></div><!--{else}--><div id="ad_text"></div><!--{/if}-->วางโค้ดนี้ด้านล้างครับ<div id="blank" style="height:245px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td style="padding-right:5px"><div id="hotarticle" style="width:350px; float:left; height:auto">
                        <p id="hotarticletabs">
                        
                        <span id="rggtab" onMouseOver="setTab('hotarticle','rgg')" style="margin-right:0px">         <img src="{IMGDIR}/a04.gif" align="absmiddle"/>กระทู้สำคัญ </span>
                        
                        <span id="rjstab" onMouseOver="setTab('hotarticle','rjs')">
                <img src="{IMGDIR}/a03.gif" align="absmiddle"/>เมนูสมาชิก</span>
                        
                        <span id="rhdtab" class="active" onMouseOver="setTab('hotarticle','rhd')"><img src="{IMGDIR}/a02.gif" align="absmiddle"/>รูปจากกระดาน</span>
                        
                        </p>
                        
                        <h3 style="margin-left:1px">??</h3>
                        <ul id="rhd" class="tabcontent" style="border:1px solid #80CDDD; 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 #80CDDD; border-top:none;margin-left:1px">
{template index_dl}
                        </ul>
                        <ul id="rgg" class="tabcontent" style="display: none;border:1px solid #80CDDD; 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%">
<tablealign="right" width="100%" border="0" cellpadding="0" >
<tr>
    <td width="33%">{template new}</td>
    <td width="33%">{template rep}</td>
    <td width="33%">{template hot}</td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>อัพโหลดไฟล์ไปไว้ที่โฟลเดอร์ของสกิน ที่ตรงกับการแก้ไขไฟล์ของสกินนั้นๆ นะครับ เรียบร้อยอัพเดทแคช

**** Hidden Message *****
ถ้าจะให้ดีเน้นสีให้ผมด้วยนะ 555+:)

mhanoii โพสต์ 2008-5-22 13:04:11

ขอขอบคุนมากมายนะจ๊ะ

snecker โพสต์ 2008-5-22 23:52:11

~:1:~   Thank you มากมายครับ

idreams โพสต์ 2008-5-23 21:31:26

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

boonnote โพสต์ 2008-5-23 22:08:27

น่าลอง...ขอบคุณนะครับ:victory:

zadman โพสต์ 2008-5-24 16:24:22

ขอบคุณครับผม

dreamwork2008 โพสต์ 2008-5-24 19:37:41

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

jackie4056 โพสต์ 2008-5-25 09:50:21

ขอบคุณครับผม

admins โพสต์ 2008-5-25 13:37:58

น่าสนแอะๆๆๆ

theerawut โพสต์ 2008-5-30 15:19:23

ครับอยากดูมาก

จากhttp://www.npkmeeting.com
หน้า: [1] 2 3 4 5 6 7 8 9
ดูในรูปแบบกติ: SATILing Toplist สำหรับ 6.1 ครับ