最新公告
  • 欢迎您光临仿站吧 帝国CMS模板一站式建站供应平台 . 欢迎加入VIP
  • 织梦CMS列表标签按照下载次数排序

    正文概述 仿站吧   2023-06-14 09:12:19  

    列表标签按照下载次数排序

    找到include目录下面的taglib目录里的arclist.lib.PHP文件在376行后加入如下代码

    1. if($orderby == 'down')
    2. {
    3. $sql = "select SUM(downloads) as down_num,id from dede_downloads group by id ORDER BY down_num DESC LIMIT 0,15";
    4. $dsql->Execute('me',$sql);
    5. while($drow = $dsql->GetArray() )
    6. {
    7. $arr[] = $drow['id'];
    8. }
    9. $dstr = implode(",",$arr);
    10. if($orwhere!='')
    11. {
    12. $orwhere .= " AND arc.id in($dstr)";
    13. }else{
    14. $orwhere .= " where arc.id in($dstr)";
    15. }
    16. $ordersql = 'ORDER BY field(arc.id,'.$dstr.')';
    17. }
    仿站吧,一个优质的源码资源平台!
    仿站吧 » 织梦CMS列表标签按照下载次数排序