本帖最后由 俊客 于 2009-8-7 18:28 编辑
解决uch2.0beta 投票空白问题也许大家也发现了
官方也是这样
正面是官方的截图:
正面是我的一起网的截图
演示:http://yqrx.com/network.html
修改方法:
打开/source/network.php
找到第187行的把9改成你要的数量
我的改成13条保存,上传,更新缓存就OK了//投票
$cachefile = S_ROOT.'./data/cache_network_poll.txt';
if(check_network_cache('poll')) {
$polllist = unserialize(sreadfile($cachefile));
} else {
$sqlarr = mk_network_sql('poll',
array('pid', 'uid'),
array('hot','voternum','replynum'),
array('dateline'),
array('dateline','voternum','replynum','hot')
);
extract($sqlarr);
//显示数量
$shownum = 13;
$polllist = array();
$query = $_SGLOBAL['db']->query("SELECT main.*
FROM ".tname('poll')." main
WHERE ".implode(' AND ', $wherearr)."
ORDER BY main.{$order} $sc LIMIT 0,$shownum");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
realname_set($value['uid'], $value['username']);
$polllist[] = $value;
}
if($_SGLOBAL['network']['poll']['cache']) {
swritefile($cachefile, serialize($polllist));
}
}
foreach($polllist as $key => $value) {
realname_set($value['uid'], $value['username']);
$polllist[$key] = $value;
} |