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

[A/M/H6.1] WOWO Toplist for 6.1 utf8 ติดตั้งง่าย สวยด้วย

[คัดลอกลิงก์]
mastergtx โพสต์ 2008-6-15 11:22:13 |โหมดอ่าน













ที่มา


http://www.alan888.com/Discuz/vi ... amp;highlight=Flash

ที่จริงแล้วสังเกตดูที่ รูปจากกระดานตัว flash ของมันไม่ได้ไปดึงเอารูปจากกระดานมาแสดงนะครับ เป็นการจับรูปไปวางในโฟลเดอร์ที่กำหนด และก็ใส่ลิงค์ ใส่อะไรต่อยุ่งมากนะ

แต่ตัวนี้ผมปรับใหม่แล้ว ให้มันไปดึงรูปจากกระดาน ที่กำหนดไว้มาแสดง โดยใช้ IE โพสนะรูปถึงจะขึ้น

วิธีติดตั้งนั้นง่ายๆ มากๆ แค่ 2ไฟล์ คือ index.php และ discuz.htm หวังว่าคงรูปนะว่าไฟล์ไหนอยู่ตรงไหน

เปิดไฟล์ index.php ขึ้นมาแล้วหา
  1. $newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
คัดลอกไปที่คลิปบอร์ด
วางโค้ดนี้ด้านล้าง
  1. //----WOWO首頁六格代碼開始BY:WOWO
  2. $colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
  3. //最新主題
  4. $hack_cut_str = 50; //標題字數
  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");
  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 = 50; //標題字數
  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;//最后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;//最后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. //----WOWO首頁六格代碼結束BY:WOWO
คัดลอกไปที่คลิปบอร์ด
เปิดไฟล์ discuz.htm ที่อยู่ใน templates\สกินที่คุณใช้งานปัจจุบัน
หา
  1. <!--{else}--><div id="ad_text"></div><!--{/if}-->
คัดลอกไปที่คลิปบอร์ด
วางโค้ดนี้ด้านล้าง
  1. {template foruminfo}
คัดลอกไปที่คลิปบอร์ด
Save อัพโหลดไฟล์ขึ้นโฮสต์ อัพเดทแคช เรียบร้อยครับง่ายๆ



มาดูโค้ดที่ผมแก้ไขในไฟล์ foruminfo.htm
ต้นฉบับ
<!-- WO WO首頁六格代碼開始 -->
<script language="javascript">
function view(a) {
document.getElementById('top1').style.display='none';
document.getElementById('top2').style.display='none';
document.getElementById('top3').style.display='none';
document.getElementById('top4').style.display='none';

document.getElementById('top'+a).style.display='block';

document.getElementById('tab1').className='';
document.getElementById('tab2').className='';
document.getElementById('tab3').className='';
document.getElementById('tab4').className='';

document.getElementById('tab'+a).className='current';
}
</script>
<div class="mainbox">
        <span class="headactions"></span>
        <h3><a href="/" title="論壇主題推薦專區">論壇主題推薦專區</a></h3>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                        <td width="35%" align="center"  style="padding: 5px 0px 0px 5px">
                                <div class="mainbox">
                                        <ul class="tabs">
                            <li class="current"><span style="padding:0 5px;"><FONT color=#FF0000>論壇活動</FONT></span></li>
                                        </ul>
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <tr>
<td style="padding:1px; border-top:0px"><span style="margin-top:-13">
<script type="text/javascript">
<!--
var focus_width=350
var focus_height=198
var text_height=0
var swf_height = focus_height+text_height
/*圖片*/
var pics='images/wowo/ab/pic1.jpg|images/wowo/ab/pic2.jpg|images/wowo/ab/pic3.jpg|images/wowo/ab/pic4.jpg|images/wowo/ab/pic5.jpg|images/wowo/ab/pic6.jpg'
/*連接*/
var links='index.php|index.php|index.php|index.php|index.php|index.php'
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/wowo/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#000000">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="images/wowo/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#000000" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');document.write('</object>');
//-->
</script>

</span>
</td>
                                                </tr>
                                        </table>
                                </div>
                        </td>
                           <td width="45%" style="padding: 5px 0px 0px 5px">
                                <div class="mainbox">
                                        <ul class="tabs">
                <li id="tab1" class="current" ><span style="padding:0 8px;" onMouseOver="javascript:view(1);"><FONT color=#FF0000>最新主題</FONT></span></li>
                <li id="tab2" class="" ><span style="padding:0 8px;" onMouseOver="javascript:view(2);"><FONT color=#33CCFF>最新回復</FONT></span></li>
                <li id="tab3" class="" ><span style="padding:0 8px;" onMouseOver="javascript:view(3);"><FONT color=#00FF00>本周熱門</FONT></span></li>
                <li id="tab4" class="" ><span style="padding:0 8px;" onMouseOver="javascript:view(4);"><FONT color=#FF00FF>隨機精華</FONT></span></li>
                                  </ul>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr valign="top">
                              <td width="24" style="padding:0;border-top:0px;"><img src="images/wowo/list.gif" border="0" /></td>
<td background="images/wowo/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat" width="100%">
                                                <div id="top1" style="display:block;">
                                                <!--{loop $new_post_threadlist $nthread}-->
                                                <!--{if $nthread[replies]}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$nthread[authorid]" title="查看$nthread[author]的詳細資料" target="_blank">$nthread[view_author]</a></em><span style="float:left;"><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></span></div><div style="clear:both;"></div>
                                                <!--{else}-->
                                 <div style="overflow: hidden;height: 20px;width:100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$nthread[authorid]" title="查看$nthread[author]的詳細資料" target="_blank">$nthread[view_author]</a></em><span style="float:left;"><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></span></div><div style="clear:both;"></div>
                                                <!--{/if}-->
                                                <!--{/loop}-->
                                                </div>
                                                <div id="top2" style="display:none;">
                                                <!--{loop $new_reply_threadlist $rthread}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?username=$rthread[lastposter]" title="查看$rthread[lastposter]的詳細資料" target="_blank">$rthread[lastposter]</a></em><span style="float:left;"><a href="redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost" $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></span></div><div style="clear:both;"></div>
                                                <!--{/loop}-->
                                                </div>
                                                <div id="top3" style="display:none;">
                                                <!--{loop $new_hot_threadlist $mthread}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$mthread[authorid]" title="查看$mthread[author]的詳細資料" target="_blank">$mthread[author]</a></em><span style="float:left;"><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title='本周熱門 {LF}所在論壇: $mthread[forumname]{LF}主題標題: {echo strip_tags($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></span></div><div style="clear:both;"></div>
                                                <!--{/loop}-->
                                                </div>
                                                <div id="top4" style="display:none;">
                                                <!--{loop $new_digest_threadlist $dthread}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$dthread[authorid]" title="查看$dthread[author]的詳細資料" target="_blank">$dthread[author]</a></em><span style="float:left;"><a href="viewthread.php?tid=$dthread[tid]" $dthread['highlight'] title='隨機精華 {LF}所在論壇: $dthread[forumname]{LF}主題標題: $dthread[subject]{LF}主題作者: $dthread[author]{LF}發表時間: $dthread[date]{LF}瀏覽次數: $dthread[views] 次{LF}回復次數: $dthread[replies] 次{LF}最後回復: $dthread[lastreplytime]{LF}{lang lastpost}: $dthread[lastposter]'>$dthread[view_subject]</a></span></div><div style="clear:both;"></div>
                                                <!--{/loop}-->
                                                </div>                                                                                               
                                  </table>
                                </div>
                        </td>
                        <td width="20%" style="padding: 5px 5px 0px 5px">
                                <div class="mainbox">
                                        <ul class="tabs">
                            <li class="current"><span style="padding:0 5px;"><FONT color=#FF0000>論壇發帖榮譽榜</FONT></span></li>
                                        </ul>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr valign="top">
                               <td width="24" style="padding:0;border-top:0px;"><img src="images/wowo/list.gif" border="0" /></td>
<td background="images/wowo/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat" width="100%">
                                                                <div>
                                                <!--{loop $today $member}-->
                                     <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;">$member[posts]</em><a href="space.php?uid=$member[uid]" title="查看$member[username]的個人空間">$member[username]</a></div>
                                                <!--{/loop}-->
                                                                </div>
                                                        </td>
                                             </tr>
                                    </table>
                            </div>
                        </td>
                </tr>
        </table>
</div>
<!-- WO WO首頁六格代碼結束 -->
เปลี่ยนเป็น
<!-- WO WO首頁六格代碼開始 -->
<script language="javascript">
function view(a) {
document.getElementById('top1').style.display='none';
document.getElementById('top2').style.display='none';
document.getElementById('top3').style.display='none';
document.getElementById('top4').style.display='none';

document.getElementById('top'+a).style.display='block';

document.getElementById('tab1').className='';
document.getElementById('tab2').className='';
document.getElementById('tab3').className='';
document.getElementById('tab4').className='';

document.getElementById('tab'+a).className='current';
}
</script>
<div class="mainbox">
        <span class="headactions"></span>
        <h3><a href="$indexname" title="หน้าแรก">สถิติการใช้งานกระดานข่าวและรูปจากกระดาน</a></h3>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                        <td width="26%" align="center"  style="padding: 5px 0px 0px 5px">
                                <div class="mainbox">
                                        <ul class="tabs">
                            <li class="current"><span style="padding:0 5px;">รูปจากกระดาน</span></li>
                                        </ul>
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                              <script type="text/javascript" src="pic.php"></script>
                                        </table>
                                </div>
                        </td>
                           <td width="45%" style="padding: 5px 0px 0px 5px">
                                <div class="mainbox">
                                        <ul class="tabs">
                <li id="tab1" class="current" ><span style="padding:0 8px;" onMouseOver="javascript:view(1);">กระทู้ล้าสุด</span></li>
                <li id="tab2" class="" ><span style="padding:0 8px;" onMouseOver="javascript:view(2);">ตอบกลับล่าสุด</span></li>
                <li id="tab3" class="" ><span style="padding:0 8px;" onMouseOver="javascript:view(3);">กระทู้ร้อนแรง</span></li>
                <li id="tab4" class="" ><span style="padding:0 8px;" onMouseOver="javascript:view(4);">กระทู้สำคัญ</span></li>
                                  </ul>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr valign="top">
                              <td width="24" style="padding:0;border-top:0px;"><img src="images/wowo/list.gif" border="0" /></td>
<td background="images/wowo/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat" width="100%">
                                                <div id="top1" style="display:block;">
                                                <!--{loop $new_post_threadlist $nthread}-->
                                                <!--{if $nthread[replies]}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$nthread[authorid]" title="查看$nthread[author]的詳細資料" target="_blank">$nthread[view_author]</a></em><span style="float:left;"><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></span></div><div style="clear:both;"></div>
                                                <!--{else}-->
                                 <div style="overflow: hidden;height: 20px;width:100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$nthread[authorid]" title="查看$nthread[author]的詳細資料" target="_blank">$nthread[view_author]</a></em><span style="float:left;"><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></span></div><div style="clear:both;"></div>
                                                <!--{/if}-->
                                                <!--{/loop}-->
                                                </div>
                                                <div id="top2" style="display:none;">
                                                <!--{loop $new_reply_threadlist $rthread}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?username=$rthread[lastposter]" title="查看$rthread[lastposter]的詳細資料" target="_blank">$rthread[lastposter]</a></em><span style="float:left;"><a href="redirect.php?tid=$rthread[tid]&goto=lastpost#lastpost" $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></span></div><div style="clear:both;"></div>
                                                <!--{/loop}-->
                                                </div>
                                                <div id="top3" style="display:none;">
                                                <!--{loop $new_hot_threadlist $mthread}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$mthread[authorid]" title="查看$mthread[author]的詳細資料" target="_blank">$mthread[author]</a></em><span style="float:left;"><a href="viewthread.php?tid=$mthread[tid]" $mthread['highlight'] title='本周熱門 {LF}所在論壇: $mthread[forumname]{LF}主題標題: {echo strip_tags($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></span></div><div style="clear:both;"></div>
                                                <!--{/loop}-->
                                                </div>
                                                <div id="top4" style="display:none;">
                                                <!--{loop $new_digest_threadlist $dthread}-->
                                <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;"><a href="space.php?uid=$dthread[authorid]" title="查看$dthread[author]的詳細資料" target="_blank">$dthread[author]</a></em><span style="float:left;"><a href="viewthread.php?tid=$dthread[tid]" $dthread['highlight'] title='隨機精華 {LF}所在論壇: $dthread[forumname]{LF}主題標題: $dthread[subject]{LF}主題作者: $dthread[author]{LF}發表時間: $dthread[date]{LF}瀏覽次數: $dthread[views] 次{LF}回復次數: $dthread[replies] 次{LF}最後回復: $dthread[lastreplytime]{LF}{lang lastpost}: $dthread[lastposter]'>$dthread[view_subject]</a></span></div><div style="clear:both;"></div>
                                                <!--{/loop}-->
                                                </div>                                                                                               
                                  </table>
                                </div>
                        </td>
                        <td width="20%" style="padding: 5px 5px 0px 5px">
                                <div class="mainbox">
                                        <ul class="tabs">
                            <li class="current"><span style="padding:0 5px;">สมาชิกใช้งานวันนี้</span></li>
                                        </ul>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                        <tr valign="top">
                               <td width="24" style="padding:0;border-top:0px;"><img src="images/wowo/list.gif" border="0" /></td>
<td background="images/wowo/listbg.gif" style="line-height:20px;padding:0;border-top:0px;background-repeat: repeat" width="100%">
                                                                <div>
                                                <!--{loop $today $member}-->
                                     <div style="overflow: hidden;height: 20px;width: 100%;"><em style="float:right; padding-top:2px;">$member[posts]</em><a href="space.php?uid=$member[uid]" title="查看$member[username]的個人空間">$member[username]</a></div>
                                                <!--{/loop}-->
                                                                </div>
                                                        </td>
                                             </tr>
                                    </table>
                            </div>
                        </td>
                </tr>
        </table>
</div>
<!-- WO WO首頁六格代碼結束 -->
[ แก้ไขล่าสุด mastergtx เมื่อ 2008-6-15 11:33 ]

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

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

x
 เจ้าของ| mastergtx โพสต์ 2008-6-15 11:42:20
นิดนึงนะ หรือเปลี่ยนจาก
  1. <h3><a href="$indexname" title="หน้าแรก">สถิติการใช้งานกระดานข่าวและรูปจากกระดาน</a></h3>
คัดลอกไปที่คลิปบอร์ด
เป็น
  1. <h3><a href="$indexname" title="$bbname">$bbname</a></h3>
คัดลอกไปที่คลิปบอร์ด
มันก็จะขึ้นชื่อเว็บเลย

include/javascript/common.js เพิ่มโค้ดนี้ด้านล้าง
  1. var sPop = null;
  2. var postSubmited = false;
  3. document.write("<style type='text/css'id='defaultPopStyle'>");
  4. document.write(".cPopText { font-family: Verdana, Tahoma; background-color: #DDEEFF; border: 1px #8899AA dashed; font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; filter: Alpha(Opacity=80)}");

  5. document.write("</style>");
  6. document.write("<div id='popLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");



  7. function showPopupText(event) {
  8.         if(event.srcElement) o = event.srcElement; else o = event.target;
  9.         if(!o) {
  10.                 return;
  11.         }
  12.         MouseX = event.clientX;
  13.         MouseY = event.clientY;
  14.         if(o.alt != null && o.alt != '') {
  15.                 o.pop = o.alt;
  16.                 o.alt = '';
  17.         }
  18.         if(o.title != null && o.title != '') {
  19.                 o.pop = o.title;
  20.                 o.title = '';
  21.         }
  22.         if(o.pop != sPop) {
  23.                 sPop = o.pop;
  24.                 if(sPop == null || sPop == '') {
  25.                         $('popLayer').style.visibility = "hidden";
  26.                 } else {
  27.                         popStyle = o.dyclass != null ? o.dyclass : 'popupmenu_popup';
  28.                         $('popLayer').style.visibility = "visible";
  29.                         showIt();
  30.                 }
  31.         }
  32. }

  33. function showIt() {
  34.         $('popLayer').className = popStyle;
  35.         $('popLayer').innerHTML = sPop.replace(/</g,"<").replace(/>/g,">").replace(/\n/g,"<br>");
  36.                
  37.         var bodySL, bodyST;
  38.         if(window.pageXOffset){
  39.                 bodySL=window.pageXOffset;
  40.         }else if(document.documentElement&&document.documentElement.scrollLeft){
  41.                 bodySL=document.documentElement.scrollLeft;
  42.         }else if(document.body){
  43.                 bodySL=document.body.scrollLeft; //author: meizz
  44.         }
  45.         
  46.         if(window.pageYOffset){
  47.                 bodyST=window.pageYOffset;
  48.         }else if(document.documentElement&&document.documentElement.scrollTop){
  49.                 bodyST=document.documentElement.scrollTop;
  50.         }else if(document.body){
  51.                 bodyST=document.body.scrollTop;
  52.         }
  53.         
  54.         var bodyCW, bodyCH;
  55.         if(window.innerWidth){
  56.                 bodyCW=window.innerWidth;
  57.         }else if(document.documentElement&&document.documentElement.clientWidth){
  58.                 bodyCW=document.documentElement.clientWidth;
  59.         }else if(document.body){
  60.                 bodyCW=document.body.clientWidth; //author: meizz
  61.         }
  62.         
  63.         if(window.innerHeight){
  64.                 bodyCH=window.innerHeight;
  65.         }else if(document.documentElement&&document.documentElement.clientHeight){
  66.                 bodyCH=document.documentElement.clientHeight;
  67.         }else if(document.body){
  68.                 bodyCH=document.body.clientHeight;
  69.         }

  70.         if($('popLayer').clientWidth>300){
  71.                 var popWidth = 300;
  72.         }else{
  73.                 var popWidth = $('popLayer').clientWidth;
  74.         }
  75.         
  76.         var popWidth = $('popLayer').clientWidth;
  77.         var popHeight = $('popLayer').clientHeight;
  78.         var popLeftAdjust = MouseX + 12 + popWidth > bodyCW ? -popWidth - 24 : 0;
  79.         var popTopAdjust = MouseY + 12 + popHeight > bodyCH ? -popHeight - 24 : 0;
  80.         $('popLayer').style.left = (MouseX + 12 + bodySL + popLeftAdjust) + 'px';
  81.         $('popLayer').style.top = (MouseY + 12 + bodyST + popTopAdjust) + 'px';
  82. }

  83. if(!document.onmouseover) {
  84.         document.onmouseover = function(e) {
  85.                 var event = e ? e : window.event;
  86.                 showPopupText(event);
  87.         };
  88. }
  89. //www.chenhailm.comALT
  90. function quickpost(event){
  91. if((event.ctrlKey && event.keyCode == 13) || (event.altKey && event.keyCode == 83)){
  92.   document.FORM.Submit.click();
  93. }
  94. }
คัดลอกไปที่คลิปบอร์ด
หรือ อีกตัว ที่มีขอบเป็นเส้นปะ แก้ให้เข้ากับ 6.1 หรือ 6.0 แล้ว

  1. var sPop = null;
  2. var postSubmited = false;
  3. document.write("<style type='text/css'>");
  4. document.write(".cPopText { font-family: Tahoma, Verdana; background-color: #FFFFFF; border: 1px #666666 dotted; font-size: 11px; padding-right: 4px; padding-left: 4px; line-height: 13px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; filter: Alpha(Opacity=80); opacity: 0.8;}");

  5. document.write("</style>");
  6. document.write("<div id='popLayer' style='position:absolute;z-index:1000' class='cPopText'></div>")

  7. function showPopupText(event) {
  8.         if(event.srcElement) o = event.srcElement; else o = event.target;
  9.         if(!o) {
  10.                 return;
  11.         }
  12.         MouseX = event.clientX;
  13.         MouseY = event.clientY;
  14.         if(o.alt != null && o.alt != '') {
  15.                 o.pop = o.alt;
  16.                 o.alt = '';
  17.         }
  18.         if(o.title != null && o.title != '') {
  19.                 o.pop = o.title;
  20.                 o.title = '';
  21.         }
  22.         if(o.pop != sPop) {
  23.                 sPop = o.pop;
  24.                 if(sPop == null || sPop == '') {
  25.                         $('popLayer').style.visibility = "hidden";
  26.                 } else {
  27.                         popStyle = o.dyclass != null ? o.dyclass : 'cPopText';
  28.                         $('popLayer').style.visibility = "visible";
  29.                         showIt();
  30.                 }
  31.         }
  32. }

  33. function showIt() {
  34.         $('popLayer').className = popStyle;
  35.         $('popLayer').innerHTML = sPop.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>");
  36.                
  37.         var bodySL, bodyST;
  38.         if(window.pageXOffset){
  39.                 bodySL=window.pageXOffset;
  40.         }else if(document.documentElement&&document.documentElement.scrollLeft){
  41.                 bodySL=document.documentElement.scrollLeft;
  42.         }else if(document.body){
  43.                 bodySL=document.body.scrollLeft; //author: meizz
  44.         }
  45.       
  46.         if(window.pageYOffset){
  47.                 bodyST=window.pageYOffset;
  48.         }else if(document.documentElement&&document.documentElement.scrollTop){
  49.                 bodyST=document.documentElement.scrollTop;
  50.         }else if(document.body){
  51.                 bodyST=document.body.scrollTop;
  52.         }
  53.       
  54.         var bodyCW, bodyCH;
  55.         if(window.innerWidth){
  56.                 bodyCW=window.innerWidth;
  57.         }else if(document.documentElement&&document.documentElement.clientWidth){
  58.                 bodyCW=document.documentElement.clientWidth;
  59.         }else if(document.body){
  60.                 bodyCW=document.body.clientWidth; //author: meizz
  61.         }
  62.       
  63.         if(window.innerHeight){
  64.                 bodyCH=window.innerHeight;
  65.         }else if(document.documentElement&&document.documentElement.clientHeight){
  66.                 bodyCH=document.documentElement.clientHeight;
  67.         }else if(document.body){
  68.                 bodyCH=document.body.clientHeight;
  69.         }

  70.         if($('popLayer').clientWidth>300){
  71.                 var popWidth = 300;
  72.         }else{
  73.                 var popWidth = $('popLayer').clientWidth;
  74.         }
  75.       
  76.         var popWidth = $('popLayer').clientWidth;
  77.         var popHeight = $('popLayer').clientHeight;
  78.         var popLeftAdjust = MouseX + 12 + popWidth > bodyCW ? -popWidth - 24 : 0;
  79.         var popTopAdjust = MouseY + 12 + popHeight > bodyCH ? -popHeight - 24 : 0;
  80.         $('popLayer').style.left = (MouseX + 12 + bodySL + popLeftAdjust) + 'px';
  81.         $('popLayer').style.top = (MouseY + 12 + bodyST + popTopAdjust) + 'px';
  82. }

  83. if(!document.onmouseover) {
  84.         document.onmouseover = function(e) {
  85.                 var event = e ? e : window.event;
  86.                 showPopupText(event);
  87.         };
  88. }
คัดลอกไปที่คลิปบอร์ด

[ แก้ไขล่าสุด mastergtx เมื่อ 2008-6-15 12:04 ]
konmunza โพสต์ 2008-6-15 13:35:09
ขอบคุณมากๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆ
buachompoox โพสต์ 2008-6-15 14:00:49
ขอบคุณครับ
g1o2l3f4 โพสต์ 2008-8-23 22:15:37
ของผมไม่โชรูปอะคับเป็นแบบนี้ในรูป

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

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

x
tossapon99 โพสต์ 2008-8-24 06:42:56
ขอบคุณมากมายเลยครับ
kanumtan โพสต์ 2008-9-11 03:51:52
ขอบคุณมากๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆๆ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

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

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

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

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

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