本帖最后由 taihom 于 2010-9-22 15:41 编辑
下面是修复方法:
1、找到\source\class\block\member\block_member.php
2、在199行找到$tables[] = DB::table('common_member_count').' mc'; 下面加一句:
$fields = 'm.*, mc.*';
3、在 230行左右 找到 case 'posts':
加上下面的代码- if($lastpost) {/*if have lastpost*/
- $tables = $wheres = array();
- $tables[] = DB::table('forum_post')." as mp LEFT JOIN ".DB::table('common_member')." as m ON mp.authorid=m.uid LEFT JOIN ".DB::table('common_member_count')." as mc ON mc.uid = m.uid ";
- $fields = 'm.*,count(mp.pid) as posts,sum(mp.first) as threads,mc.extcredits1,mc.extcredits2,mc.extcredits3,mc.extcredits4,mc.extcredits5,mc.extcredits6,mc.extcredits7,mc.extcredits8,mc.friends,mc.digestposts,mc.doings,mc.blogs,mc.albums,mc.sharings,mc.attachsize,mc.views';
-
- $time = TIMESTAMP - $lastpost;
- $wheres[] = " mp.Dateline>'$time' ";
- $sqlorderby = " Group by mp.authorid Order by Count(mp.pid) Desc";
- break;
- }
复制代码 然后继续往下:
4、找到 $query = DB::query("SELECT m.*, mc.* FROM $tablesql WHERE $wheresql $sqlorderby LIMIT $startrow,$items");
把 m.*, mc.* 替换成 $fields
5、保存OK,上传到相应位置,然后更新一下缓存,更新一下调用数据,就可以了。
不知道的,请下载下面的文件,直接覆盖至相应的文件。
\source\class\block\member\block_member.php
|