有人说: "要么旅行,要么读书,身体和灵魂,必须有一个在路上。 "这次川西之行我们走进四姑娘山。四姑娘山,是四座并立的山峰,山体陡峭,直指蓝天,冰雪覆盖,银光照人,享有 "蜀山皇后 "的美誉。
修改全部在/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(); |
在下面加入:
$GLOBALS['autoindex']++; |
调用办法:
{dede:memberlist row='15' orderby='homecount'} <li> <a rel="nofollow noopener noreferrer" href="../user/index.php?uid=[field:userid/]"> <span class="member_name">[field:global.autoindex/]、[field:uname/]</span> </a> </li> {/dede:memberlist} |
以上就是dede:memberlist按照空间点击数homecount排序并加上序号的办法。一个人,只要知道付出爱与关心,她内心自然会被爱与关心充满。更多关于dede:memberlist按照空间点击数homecount排序并加上序号的办法请关注haodaima.com其它相关文章!