|
修改全部在/include/taglib/memberlist.lib.php 这个文件中:
找到:
- $sql = "SELECT mb.*,ms.spacename,ms.sign FROM `dede_member` mb
- LEFT JOIN `dede_member_space` ms ON ms.mid = mb.mid
- $wheresql order by mb.{$orderby} DESC LIMIT 0,$row ";
复制代码
修改为:
- if($orderby=='homecount')
-     {
-     $sql = "SELECT mb.*,ms.spacename,ms.sign,ht.homecount FROM `dede_member` mb
-         LEFT JOIN `dede_member_space` ms ON ms.mid = mb.mid left join  `dede_member_tj` ht ON ht.mid = mb.mid
-         $wheresql order by ht.homecount DESC LIMIT 0,$row ";
-     }
-     else
-     {
-         $sql = "SELECT mb.*,ms.spacename,ms.sign,ht.homecount FROM `dede_member` mb
-         LEFT JOIN `dede_member_space` ms ON ms.mid = mb.mid left join  `dede_member_tj` ht ON ht.mid = mb.mid
-         $wheresql order by mb.{$orderby} DESC LIMIT 0,$row ";
-     }
复制代码
按照autoindex排序的办法,找到:
- while($row = $dsql->GetArray('mb'))
复制代码
在这段的前面加入:
- $GLOBALS['autoindex']='1';
复制代码
找到如下代码:
- $revalue .= $ctp->GetResult();
复制代码
在下面加入:
调用办法:
查看源码打印代码帮助
- {dede:memberlist row='15' orderby='homecount'}
- <li> <a href="../user/index.php?uid=[field:userid/]"> <span class="member_name">[field:global.autoindex/]、[field:uname/]</span> </a> </li>
- {/dede:memberlist}
复制代码
|
|