当前位置 : 主页 > 建站教程 > dedecms >

dede:memberlist按照空间点击数homecount排序并加上序号的办法

来源:互联网 收集:自由互联 发布时间:2021-06-20
修改全部在/include/taglib/memberlist.lib.php 这个文件中: 找到: 1 $sql = SELECT mb.*,ms.spacename,ms.sign FROM `dede_member` mb 2 LEFT JOIN `dede_member_space` ms ON ms.mid = mb.mid 3 $wheresql order by mb.{$orderby} DESC LIM
修改全部在/include/taglib/memberlist.lib.php 这个文件中:

找到:


1 $sql = "SELECT mb.*,ms.spacename,ms.sign FROM `dede_member` mb 2         LEFT JOIN `dede_member_space` ms ON ms.mid = mb.mid 3         $wheresql order by mb.{$orderby} DESC LIMIT 0,$row ";
修改为:

01 if($orderby=='homecount') 02     { 03     $sql = "SELECT mb.*,ms.spacename,ms.sign,ht.homecount FROM `dede_member` mb 04         LEFT JOIN `dede_member_space` ms ON ms.mid = mb.mid left join  `dede_member_tj` ht ON ht.mid = mb.mid 05         $wheresql order by ht.homecount DESC LIMIT 0,$row "; 06     } 07     else 08     { 09         $sql = "SELECT mb.*,ms.spacename,ms.sign,ht.homecount FROM `dede_member` mb 10         LEFT JOIN `dede_member_space` ms ON ms.mid = mb.mid left join  `dede_member_tj` ht ON ht.mid = mb.mid 11         $wheresql order by mb.{$orderby} DESC LIMIT 0,$row "; 12     }
网友评论
相关栏目