[MY]Display Score for forumdisplay Discuz 7.0
อ้างอิงหัวข้อ Display Score for forumdisplay
เวลา 2009-02-06
ผู้โพส buachompoox.com
ที่มา http://www.buachompoox.com/thread-1503-1-1.html
เพิ่มเติม Easy MOD
1. edit file forumdisplay.php
find code$querysticky = '';
.
.
.
.
.
$query = '';change $querysticky = '';
$query = $db->query("SELECT $dotadd1 t.*, p.rate, p.pid FROM {$tablepre}threads t $dotadd2
LEFT JOIN {$tablepre}posts p USING(tid, dateline)
WHERE t.fid='$fid' $filteradd AND $displayorderadd
ORDER BY t.displayorder DESC, t.$orderby $ascdesc
LIMIT ".($filterbool ? $start_limit : $start_limit - $stickycount).", $tpp");
} else {
$querysticky = $db->query("SELECT $dotadd1 t.*, p.rate,p.pid FROM {$tablepre}threads t $dotadd2
LEFT JOIN {$tablepre}posts p USING(tid, dateline)
WHERE t.tid IN ($stickytids) AND t.displayorder IN (2, 3)
ORDER BY displayorder DESC, $orderby $ascdesc
LIMIT $start_limit, ".($stickycount - $start_limit < $tpp ? $stickycount - $start_limit : $tpp));
if($tpp - $stickycount + $start_limit > 0) {
$query = $db->query("SELECT $dotadd1 t.*, p.rate,p.pid FROM {$tablepre}threads t $dotadd2
LEFT JOIN {$tablepre}posts p USING(tid, dateline)
WHERE t.fid='$fid' $filteradd AND $displayorderadd
ORDER BY displayorder DESC, $orderby $ascdesc
LIMIT ".($tpp - $stickycount + $start_limit));
} else {
$query = '';and find code$threadlist[] = $thread;put down after code next line$tpids[] = $thread['pid'];and find code$separatepos = $separatepos ? $separatepos + 1 : ($announcement ? 1 : 0);put up befor code toplineif (is_array($tpids)){
$pids = implode(",",$tpids);
$detail_query = $db->query("SELECT * FROM {$tablepre}ratelog WHERE pid IN ($pids)");
while ($row = $db->fetch_array($detail_query)){
$detail_rate[$row['pid']][$row['extcredits']] += $row['score'];
}
}2. edit file templates/default/css_append.htm
add this code.yellow { width:45px; height:50px; float:left; background:url({IMGDIR}/yellow.gif) no-repeat center top; margin:1px; text-align:center; color:#217AB3; font-weight:bold; font-size:18px; line-height:27px; font-family: Georgia, "Times New Roman", Times, serif; padding-right:3px;}
.yellow p { display:block; font-weight:100; margin:0px; padding:0px; border:0px; color:#858D92; font-size:11px; }
.red { width:45px; height:50px; float:left; background:url({IMGDIR}/red.gif) no-repeat center top; margin:1px; text-align:center; color:#ff6645; font-weight:bold; font-size:18px; line-height:27px; font-family: Georgia, "Times New Roman", Times, serif; padding-right:3px;}
.red p { display:block; font-weight:100; margin:0px; padding:0px; border:0px; color:#FFFFFF; font-size:11px; }3. edit files templates/default/forumdisplay.htm
find code <td class="folder">
<a href="viewthread.php?tid=$thread&extra=$extra" title="{lang target_blank}" target="_blank">
<!--{if $thread == 'lock'}-->
<img src="{IMGDIR}/folder_lock.gif" alt="Lock" />
<!--{elseif in_array($thread['displayorder'], array(1, 2, 3))}-->
<img src="{IMGDIR}/pin_$thread.gif" alt="$threadsticky]" />
<!--{else}-->
<img src="{IMGDIR}/folder_$thread.gif" alt="$thread" />
<!--{/if}-->
</a>
</td>CHANGE !!! <td class="folder">
<!--{if $thread['rate'] > 0}--><div class="red">+$thread['rate']<p>Points</p></div><!--{elseif $thread['rate'] < 0}--><div class="red">-$thread['rate']<p>Points</p></div><!--{else}--><div class="yellow">0<p>Points</p></div><!--{/if}-->
</td>find code and DELETE <!--{if $thread['rate'] > 0}-->
<img src="{IMGDIR}/agree.gif" alt="{lang rate_credit_add}" title="{lang rate_credit_add}" />
<!--{elseif $thread['rate'] < 0}-->
<img src="{IMGDIR}/disagree.gif" alt="{lang rate_credit_reduce}" title="{lang rate_credit_reduce}" />
<!--{/if}-->LAST step UPload image
TO .images/default/
Download :
แจ่มมากครับนี่แหละที่หามานาน ขอบคุณค้าแจ่มมากๆลองแล้ว
http://www.ไอซีโซเชี่ยว.com/bbs/forum-10-1.html
แวะไปดูได้นะจ๊ะ จุ๊บๆๆๆๆๆๆๆๆๆๆ แก้ไขล่าสุด flukenakrab เมื่อ 2009-2-21 09:16
ขอบคุณครับ ชอบคุณครับมากกกกก ชอบคุณครับมากกกกก ชอบคุณครับมากกกกก ชอบคุณครับมากกกกก ชอบคุณครับมากกกกก ใครทำทุกขั้นตอนแล้วรูปไม่ขึ้น อาจเป็นเพราะใช้ skin ครับ
ให้ไปเพิ่มโค๊ดในข้อ 2 ที่
templates/สกินที่ใช้อยู่/css_append.htm
ผมหาตั้งนาน ทำไมรูปไม่ขึ้น {:15_678:}
หน้า:
[1]
2