[HOT][เพิ่มโค๊ด] MOD,Discuz.htm [แสดงบอร์ดอีกแบบสวยๆครับ..] ( หมดปัญหาบัคต่างๆ)
แก้ไขครั้งสุดท้ายโดย -xSoMax- เมื่อ 2011-12-9 22:37ดูผลงาน ModHack ต่างๆของ exsomaxz ได้ที่ ggthai.com เท่านั้น
อนาคตอาจเปิดรับทำสกินแบบโก๋อย่างเต็มรูปแบบ ตอนนี้กำลังศึกษา CSS ขั้นสูงอยู่^^
เอามาจากกระทู้ http://forum.discuzthai.com/thread-30829-1-1.html
เพือนๆหลายคนเอาไพล์ไปทับแล้วมีปัญหาเยอะมากมาย เรามาลุยวิธีลงโค๊ดเองดีกว่า ง่ายดี ชิวๆ อย่าลืมสำรองไพล์เก่าด้วย!
ต้นฉบับ : Style by 4DEZIGN
ปรับแต่งใหม่ : by POR20150
ปรับแต่งใหม่และเรียบเรียงโค๊ดที่ไม่ใช้และแก้ไขปัญหาทั้งหมดไว้ให้แล้ว: by -xSoMax-
ก่อนอื่น โหลดไพล์แล้วนำไปวาง static/image/สกินที่ใช้/
อย่าลืม + กะกาน! ไม่กด + อดรู้วิธีแก้ปัญหาเน้อ!
เปิดไพล์ discuz.htm เข้าไปที่ /สกินที่ใช้ /forum/discuz.htm
ค้นหา <table cellspacing="0" cellpadding="0" class="fl_tb">
<tr>
<!--{loop $cat $forumid}-->
<!--{eval $forum=$forumlist[$forumid];}-->
<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
<!--{if $cat['forumcolumns']}-->
<!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
</tr>
<!--{if $forum['orderid'] < $cat['forumscount']}-->
<tr class="fl_row">
<!--{/if}-->
<!--{/if}-->
<td class="fl_g" width="$cat">
<div class="fl_icn_g"{if !empty($forum) && !empty($forum)} style="width: {$forum}px;"{/if}>
<!--{if $forum}-->
$forum
<!--{else}-->
<a href="$forumurl"{if $forum} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum}_new{/if}.gif" alt="$forum" /></a>
<!--{/if}-->
</div>
<dl{if !empty($forum) && !empty($forum)} style="margin-left: {$forum}px;"{/if}>
<dt><a href="$forumurl"{if $forum} target="_blank"{/if}{if $forum} style="color: {$forum};"{/if}>$forum</a><!--{if $forum && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum)</em><!--{/if}--></dt>
<!--{if empty($forum)}--><dd><em>{lang forum_threads}: $forum</em>, <em>{lang forum_posts}: $forum</em></dd><!--{/if}-->
<dd>
<!--{if $forum['permission'] == 1}-->
{lang private_forum}
<!--{else}-->
<!--{if $forum['redirect']}-->
<a href="$forumurl" class="xi2">{lang url_link}</a>
<!--{elseif is_array($forum['lastpost'])}-->
<!--{if $cat['forumcolumns'] < 3}-->
<a href="forum.php?mod=redirect&tid=$forum&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum, 30)}--></a> <cite>$forum <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G<!--{/if}--></cite>
<!--{else}-->
<a href="forum.php?mod=redirect&tid=$forum&goto=lastpost#lastpost">{lang forum_lastpost}: $forum</a>
<!--{/if}-->
<!--{else}-->
{lang never}
<!--{/if}-->
<!--{/if}-->
</dd>
</dl>
</td>
<!--{else}-->
<td class="fl_icn" {if !empty($forum) && !empty($forum)} style="width: {$forum}px;"{/if}>
<!--{if $forum}-->
$forum
<!--{else}-->
<a href="$forumurl"{if $forum} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum}_new{/if}.gif" alt="$forum" /></a>
<!--{/if}-->
</td>
<td>
<h2><a href="$forumurl"{if $forum} target="_blank"{/if}{if $forum} style="color: {$forum};"{/if}>$forum</a><!--{if $forum && !$forum['redirect']}--><em class="xw0 xi1" title="{lang forum_todayposts}"> ($forum)</em><!--{/if}--></h2>
<!--{if $forum}--><p class="xg2">$forum</p><!--{/if}-->
<!--{if $forum['subforums']}--><p>{lang forum_subforums}: $forum['subforums']</p><!--{/if}-->
<!--{if $forum['moderators']}--><p>{lang forum_moderators}: <span class="xi2">$forum</span></p><!--{/if}-->
</td>
<td class="fl_i">
<!--{if empty($forum)}--><span class="xi2">$forum</span><span class="xg1"> / $forum</span><!--{/if}-->
</td>
<td class="fl_by">
<div>
<!--{if $forum['permission'] == 1}-->
{lang private_forum}
<!--{else}-->
<!--{if $forum['redirect']}-->
<a href="$forumurl" class="xi2">{lang url_link}</a>
<!--{elseif is_array($forum['lastpost'])}-->
<a href="forum.php?mod=redirect&tid=$forum&goto=lastpost#lastpost" class="xi2"><!--{echo cutstr($forum, 30)}--></a> <cite>$forum <!--{if $forum['lastpost']['author']}-->$forum['lastpost']['author']<!--{else}-->$_G<!--{/if}--></cite>
<!--{else}-->
{lang never}
<!--{/if}-->
<!--{/if}-->
</div>
</td>
</tr>
<tr class="fl_row">
<!--{/if}-->
<!--{/loop}-->
$cat['endrows']
</tr>
</table>แทนที่ <table cellspacing="0" cellpadding="0" class="fl_tb">
<tr>
<!--{loop $cat $forumid}-->
<!--{eval $forum=$forumlist[$forumid];}-->
<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
<!--{if $cat['forumcolumns']}-->
<!--{if $forum['orderid'] && ($forum['orderid'] % $cat['forumcolumns'] == 0)}-->
</tr>
<!--{if $forum['orderid'] < $cat['forumscount']}-->
<tr class="fl_row">
<!--{/if}-->
<!--{/if}-->
<td style="padding-left:10px; background:url({IMGDIR}/441.png) no-repeat;" class="" width="$cat">
<div class=""{if !empty($forum) && !empty($forum)} style="width: {$forum}px;"{/if}>
<!--{if $forum}-->
<a href="$forumurl"{if $forum} target="_blank"{/if}{if $forum} style="color: {$forum};"{/if}>» $forum</a><!--{if $forum['moderators']}--><!--{if $moddisplay == 'flat'}--><p class="moderators">{lang forum_moderators}: $forum</p><!--{else}--><span class="dropmenu" id="mod$forum" onmouseover="showMenu(this.id)"><img src="{IMGDIR}/0v2.png" /></span><ul class="moderators popupmenu_popup" id="mod$forum_menu" style="display: none; background: url({IMGDIR}/mpop.png); width:300px; height:50px;"><div style=" padding-left:10px; padding-top:20px;">$forum</div></ul><!--{/if}-->
<!--{else}-->
<span class="dropmenu" id="mod$forum" onmouseover="showMenu(this.id)"><img src="{IMGDIR}/0v1.png" /></span> <ul class="moderators popupmenu_popup" id="mod$forum_menu" style="display: none; background: url({IMGDIR}/mpop.png); width:300px; height:50px;"><div style=" padding-left:10px; padding-top:20px;"><a href="#"><font color=#ff0000>ยังไม่มี ผู้ดูแล ครับผม..</font></a></div></ul>
<!--{/if}-->
<br />
$forum
<!--{else}-->
<div style="width:205px; height:1px;">» $forum
<a href="$forumurl"{if $forum} target="_blank"{/if}><img src="{IMGDIR}/forum{if $forum}_new{/if}.gif" alt="$forum" /></a></div><br />
<!--{/if}-->
<br/>
<br/>
<br/>
<br/>
<!--{if empty($forum)}-->
<div class="di2" style=" height:28px;"><font color="#FFFFFF">วันนี้:</font> $forum <font color="#FFFFFF">โพสต์:</font> $forum <font color="#FFFFFF">ตอบกลับ:</font> $forum</div>
<!--{/if}-->
<div class="di3-1" style=" height:45px; line-height:20px; overflow:hidden;">
<!--{if $forum}-->
<img src="{IMGDIR}/ann.gif" align="absmiddle"/> $forum
<!--{else}-->
ยังไม่มีรายระเอียด ณ ที่นี้
<!--{/if}-->
<div >
<!--{if $forum['redirect']}-->
<a style="color:#999999" href="$forumurl">{lang url_link}</a>
<!--{elseif is_array($forum['lastpost'])}-->
<img src="http://www.dae.mi.th/images/dot2.gif" width="14" height="14" border="0" />
<a href="forum.php?mod=redirect&tid=$forum&goto=lastpost#lastpost" class="xi2">
<!--{echo cutstr($forum, 48)}-->
</a>
<!--{else}-->
ยังไม่มีกระทู้ <a style="color:#666666" href="forum.php?mod=post&action=newthread&fid=$forum">กดที่นี่เพื่อตั้งกระทู้</a>
<!--{/if}--></div>
</td>
<!--{else}-->
<td align="center" class="fl_icn" {if !empty($forum) && !empty($forum)} style="width: {$forum}px;"{/if}>
<!--{if $forum}-->
$forum
<!--{else}-->
<a href="$forumurl"{if $forum} target="_blank"{/if}><img src="{IMGDIR}/forum-1.gif" alt="$forum" /></a>
<!--{/if}-->
</td>
<td>
<a href="$forumurl"{if $forum} target="_blank"{/if}{if $forum} style="color: {$forum};"{/if}><strong>» $forum</strong> </a><!--{if $forum && !$forum['redirect']}--><!--{/if}-->|<span class="style28">
<!--{if empty($forum)}-->
วันนี้: <span style="color: rgb(0, 204, 255);">$forum</span> <span style="color:#FF00FF;"><span style="color:#666666;">โพสต์</span>: </span></span><span style="color: rgb(153, 204, 0);">$forum</span> ตอบกลับ: <span style="color: rgb(255, 51, 153);">$forum</span>
<!--{/if}-->
<br/>
<span class="style1">
<!--{if $forum}-->
<img src="{IMGDIR}/ann.gif" align="absmiddle"/> $forum
<!--{else}-->
ยังไม่มีรายระเอียด ณ ที่นี้
<!--{/if}-->
<!--{if $forum['subforums']}--><p>{lang forum_subforums}: $forum['subforums']</p><!--{/if}--><br />
<!--{if $forum['moderators']}--><!--{if $moddisplay == 'flat'}--><p class="moderators"><img src="{IMGDIR}/0v2.png" /> $forum</p><!--{else}--><img src="{IMGDIR}/0v2.png" /> $forum<!--{/if}-->
<!--{else}-->
<img src="{IMGDIR}/0v1.png" /> <a href="#"><font color=#ff0000>ยังไม่มี ผู้ดูแลครับผม..</font></a>
<!--{/if}-->
</td>
<td class="csnon">
<!--{if empty($forum)}--><div class="di">$forum<p>$forum</p></div><!--{/if}-->
</td>
<td class="fl_by">
<div>
<!--{if $forum['permission'] == 1}-->
{lang private_forum}
<!--{else}-->
<!--{if $forum['redirect']}-->
<a href="$forumurl" class="xi2">{lang url_link}</a>
<!--{elseif is_array($forum['lastpost'])}--><img src="{IMGDIR}/053753251.gif" width="16" height="16"/> <a href="forum.php?mod=redirect&tid=$forum&goto=lastpost#lastpost" class="xi2"><font color="#FF6600"><!--{echo cutstr($forum, 30)}--></font></a> <cite><font color="#999999"><img src="{IMGDIR}/web_icon_017.gif" /> $forum <!--{if $forum['lastpost']['author']}--><br />
<img src="{IMGDIR}/web_icon_022.gif" /> $forum['lastpost']['author']<!--{else}-->{lang anonymous}<!--{/if}--></font></cite>
<!--{else}-->
<img src="{IMGDIR}/mbi_043.gif" /> ยังไม่มีกระทู้
<!--{/if}-->
<!--{/if}-->
</div>
</td>
</tr>
<tr class="fl_row">
<!--{/if}-->
<!--{/loop}-->
$cat['endrows']
</tr>
</table>
หมายเหตุ......เวลาบันทึกไพล์ เลือก UTF-8 นะครับ ท่าเลือก ANSI จะเป็นภาษาต่างดาว
เปิดไพล์ common.css เข้าไปที่ /สกินที่ใช้ /common/common.css
เพิ่มไว้ล่างสุดของโค๊ด
.di2 { width:200px; height:30px; padding-top:6px; background:url({IMGDIR}/di2.jpg) no-repeat center top;text-align:center; text-shadow: 0 0 0.2em #838383, 0 0 0.2em #838383; color:#000000;}
.di3-1 { width:200px; height:30px; padding-top:1px; background:url({IMGDIR}/di3-1.jpg) no-repeat center top;text-align:center; text-shadow: 0 0 0.2em #838383, 0 0 0.2em #838383; color:#000000;}
.tvv { width:150px; height:25px; padding-top:22px; background:url({IMGDIR}/tvv.jpg) no-repeat center top;}
.di { width:67px; height:50px; padding-top:6px; background:url({IMGDIR}/di.jpg) no-repeat center top; margin:1px; text-align:center; text-shadow: 0 0 0.2em #838383, 0 0 0.2em #838383; color:#000000; font-weight:bold; font-size:17px; line-height:18px; }
.di p {display:block; text-shadow: 0 0 0.2em #ccc, 0 0 0.2em #ccc; font-weight:100; margin:0px; padding-top:6px; border:0px; color:#fff; font-size:14px; }
เปิดไพล์ module.css เข้าไปที่ /สกินที่ใช้ /common/module.css
ค้นหา.fl_tb { width: 100%; }ปรับเป็น.fl_tb { width: XX px; }หมายเหตุ XX ให้เปลียนเป็นเลข เช่น 900px 950px 1000px ตามความเหาะสมของเว็บบอร์ดของคุณนะคับ
อัพแคช เป็นเสร็จเรียบร้อย!
เสร็จแล้วก๊าบ อย่าลืม + กะกาน! ไม่กด + อดรู้วิธีแก้ปัญหาเน้อ! นายครับ ทำไมของผมมันกลายเป็นภาษาต่างดาวซะงั้นอ่า ตรงวันนี้ โพส ตอบกลับ อ่ะครับ แก้ไขครั้งสุดท้ายโดย chaisawang เมื่อ 2011-12-9 15:04
ขอบคุณมากครับได้แล้วครับผม
ตรงแก้ .fl_tb { width: 100%; } ผมลองไม่แก้ดูครับ ก็สามารถใช้ได้เหมือนกัน ขอบไม่ตกด้วยครับ
เพราะของผม ใช้ Firefox กับ Chrome เทียบกันเหมือนมันจะไม่เท่ากันอ่ะครับขนาดของบอร์ด เยี่ยมไปเลยครับ ผมใช้สกินอันนี้อ่ะครับ http://forum.discuzthai.com/forum.php?mod=viewthread&tid=27526&page=1
ทำให้มันไม่เห็นหน้าบอร์ดที่แต่งใหม่เลยครับ พอจะมีวิธีแก้หรือเปล่าครับ ต้องเอาไฟล์ discuz.htm common.css
ไปวางที่ไหนหรือเปล่าครับ ช่วยทีนะครับ เพราะ infuse มันสวยมากเลย ขอบคุณมากคร๊าฟ sm942dz รบกวนทำอย่างนี้ให้ 7.2 หน่อยสิครับ หวังว่ายังไม่ถูกลืม {:18_777:} พี่ครับ มือใหม่ ใส่ภาพยังไง อ่าครับ
**ใส่ภาพให้บอร์ด**
หน้า:
[1]