找到:
$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 href="../user/index.php?uid=[field:userid/]"> <span class="member_name">[field:global.autoindex/]、[field:uname/]</span> </a> </li> {/dede:memberlist} |
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!
希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 lecms, classcms, fastadmin, pbootcms, phpcms, eyoucms, yzmcms, PHP, xunruicms, jizhicms, dedecms, wordpress, hkcms, yzncms, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。