ThreadThumb Preview annex discuz 7.0 - 7.2
แก้ไขล่าสุดโดย buachompoox เมื่อ 2010-2-1 15:09จากการทดสอบใช้งานได้ทั้งดิสคัท 7.0 -7.2 เลยครับtopic : ThreadThumb Preview annex discuz 7.0
Support IE 6 IE 7 FF & Google chrome
First step Upload files
- threadicon.php
- include/thumbnail.inc.php
- include/js/preview_loader.js
- include/js/preview_templates.css
- include/js/preview_templates.js
Second Step Modify
แก้ไขไฟล์ forumdisplay.php
หาโค้ด$threadlist[] = $thread;เพิ่มโค๊ดนี้ด้านบน#-- 主题封面 by 郭鑫
$at = array();
$query1 = '';
$query1 = $db->query("SELECT * FROM {$tablepre}attachments WHERE tid=$thread AND isimage=1 LIMIT
0,1");
$at = $db->fetch_array($query1);
if($at){
$thread['thumb'] = 'attachments/'.$at['attachment'];
}
#-- /主题封面 by 郭鑫แก้ไขไฟล์ templates/default/forumdisplay.htm
หาโค๊ด{subtemplate header}เพิ่มโค้ดนี้ด้านล่าง:<style>
.threadicon{
border:1px solid #7A7A7A;
padding:2px;
background:#FFF;
}
</style>หาโค๊ด<!--{else}-->
<div id="ad_text"></div>
<!--{/if}-->เพิ่มโค๊ดนี้ด้านล่าง:<script src="include/js/preview_loader.js" language="JavaScript" type="text/javascript"></script>
<script src="include/js/preview_templates.js" language="JavaScript" type="text/javascript"></script>
<link href="include/js/preview_templates.css" rel="stylesheet" type="text/css">
<div style="display: none; position: absolute;z-index:110;width:1px;height:1px" id="preview_div"></div>หาโค้ด<td class="icon">เพิ่มโค้ดนี้ดานล่าง:<!--主题封面 by buachompoox-->
<!--{if $thread['thumb']}-->
<img src="threadicon.php?filename={$thread}
&width=30&height=30" class="threadicon" onmouseover="showtrail('$thread['thumb']','<b>$thread</b>',250,250)" onmouseout="hidetrail()" />
<!--{else}-->
<!--/主题封面 by buachompoox-->หาโค้ด <!--{else}-->
$thread['icon']
<!--{/if}-->เพิ่มโค้ดนี้ด้านล่าง:<!--{/if}-->Last step Update cache !!!
Images show sizewidth & height
width=30&height=30
ENJOY ขอบคุณครับ ขอบคุณครับ ทำได้แล้ว>< <td class="icon">มันมีเยอะอะครับ มันอันไหนอ่ะครับ ขอบคุณครับ มันมีเยอะอะครับ มันอันไหนอ่ะครับ ขอบคุณครับ
ต้นฉบับโพสโดย psc_chine เมื่อ 2008-12-22 10:43
จะมีอันเดียวที่อยู่โดดๆ อะครับ ลงไปแล้ว นี่แหละครับที่หามานาน ยังไม่ได้เลยครับ ไม่รู้เป็นที่อะไรลองทำตามทุกอย่างแล้วครับ มันขึ้นว่างี้อ่ะครับ
Parse error: syntax error, unexpected T_STRING in /home/ไอซีโซเชี่ยว/domains/ไอซีโซเชี่ยว.com/public_html/bbs/forumdisplay.php on line 372 ยังไม่ได้เลยครับ ไม่รู้เป็นที่อะไรลองทำตามทุกอย่างแล้วครับ มันขึ้นว่างี้อ่ะครับ
Parse error: syntax error, unexpected T_STR ...
ต้นฉบับโพสโดย psc_chine เมื่อ 2008-12-22 22:48 http://www.discuzthai.com/images/common/back.gif
ลองเอาภาษาจีนออกครับ แล้วก็เลื่อนโค๊ดต่างๆ ให้เป็นระเบียบ
ไม่รู้เหมือนกันนะ แต่ผมทำแบบนี้จริงๆอะ แล้วก็ได้;P
ปล. Firefox ไม่แสดงผลขอบของ Thumbnail ครับ และผมขอไฟล์ forumdisplay.php และ template/default/forumdisplay.html
หน่อยได้ไหมครับ งง จริงๆ ขอบคุณครับ ขอบคุณคับ
อยากได้มานานแล้ว แต่..ทำไม่เคยได้