1.viewthread_special.inc.php 查找 <a id="more"></a> $multipage = multi($repostnum, $ppp, $page, “viewthread.php?tid=$tid&do=$do&extra=$extra”.(isset($highlight) ? “&highlight=”.rawurlencode($highlight) : ‘’)); 后面加
$ratelogpids = 0; 查找if($attachpids) { 前面加if($ratelogpids) { $query = $db->query(“SELECT * FROM {$tablepre}ratelog WHERE pid IN ($ratelogpids) ORDER BY dateline DESC”); while($ratelog = $db->fetch_array($query)) { if(count($postlist[$ratelog[‘pid’]][‘ratelog’]) < $ratelogrecord) { $ratelog[‘dateline’] = gmdate(“$dateformat $timeformat”, $ratelog[‘dateline’] + $timeoffset * 3600); $ratelog[‘score’] = $ratelog[‘score’] > 0 ? ‘+’.$ratelog[‘score’] : $ratelog[‘score’]; $ratelog[‘reason’] = dhtmlspecialchars($ratelog[‘reason’]); $postlist[$ratelog[‘pid’]][‘ratelog’][] = $ratelog; } } } 2.viewthread_debate.inc.php 查找$postlist = $post = array(); 后面加$ratelogpids = 0; 查找ksort($postlist); 前面加
`if($ratelogpids) {
$query = $db->query(“SELECT FROM {$tablepre}ratelog WHERE pid IN ($ratelogpids) ORDER BY dateline DESC”);
while($ratelog = $db->fetch_array($query)) {
if(count($postlist[$ratelog[‘pid’]][‘ratelog’]) < $ratelogrecord) {
$ratelog[‘dateline’] = gmdate(“$dateformat $timeformat”, $ratelog[‘dateline’] + $timeoffset 3600);
$ratelog[‘score’] = $ratelog[‘score’] > 0 ? ‘+’.$ratelog[‘score’] : $ratelog[‘score’];
$ratelog[‘reason’] = dhtmlspecialchars($ratelog[‘reason’]);
$postlist[$ratelog[‘pid’]][‘ratelog’][] = $ratelog;
}
}
}
3.viewthread_trade.inc.php
查找$tradespids = array();
后面加$ratelogpids = 0;
查找if(($do == ‘viewtrade’ || $do == ‘viewall’) && $tradespids) {
前面加if($ratelogpids) {
$query = $db->query(“SELECT FROM {$tablepre}ratelog WHERE pid IN ($ratelogpids) ORDER BY dateline DESC”);
while($ratelog = $db->fetch_array($query)) {
if(count($postlist[$ratelog[‘pid’]][‘ratelog’]) < $ratelogrecord) {
$ratelog[‘dateline’] = gmdate(“$dateformat $timeformat”, $ratelog[‘dateline’] + $timeoffset 3600);
$ratelog[‘score’] = $ratelog[‘score’] > 0 ? ‘+’.$ratelog[‘score’] : $ratelog[‘score’];
$ratelog[‘reason’] = dhtmlspecialchars($ratelog[‘reason’]);
$postlist[$ratelog[‘pid’]][‘ratelog’][] = $ratelog;
}
}
}
4.viewthread_*_post.htm
//添加评分按钮
查找在前面加
//添加已评分标记
查找在后面加
//添加显示评分记录
查找在前面加
$ratelog[username]
{$extcredits[$ratelog[extcredits]][title]}
_*$ratelog[score]__
_$ratelog[reason]
$ratelog[dateline]`
投票等特殊贴里添加评分功能
本文由作者按照
CC BY-NC-SA 4.0
进行授权
Comments powered by Disqus.