Warning: Undefined array key "night" in /www/wwwroot/dhaomu.com/wp-content/themes/b2/header.php on line 18

织梦教程如何按照软件下载次数排列

织梦教程如何按照软件下载次数排列。dedecms教程织梦如何按照软件下载次数排列?织梦的arclist标签可以按照文章点击次数、发布日期、得分等进行排序。

dedecms教程织梦如何按照软件下载次数排列?织梦的arclist标签可以按照文章点击次数、发布日期、得分等进行排序。

今天有个客户需要按照软件下载次数进行排列,于是做了简单二次开发。

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

 if($orderby == 'down')
 {
  $sql = "select SUM(downloads) as down_num,id from dede_downloads group by id ORDER BY down_num DESC LIMIT 0,15";
  $dsql->Execute('me',$sql);
  while($drow = $dsql->GetArray() )
  {
   $arr[] = $drow['id'];
  }
  $dstr = implode(",",$arr);
  if($orwhere!='')
  {
   $orwhere .= " AND arc.id in($dstr)";
  }else{
   $orwhere .= " where arc.id in($dstr)";
  }
  $ordersql = 'ORDER BY field(arc.id,'.$dstr.')';
 }
温馨提示:
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:duhaomu@163.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明

给TA赞赏
共{{data.count}}人
人已赞赏
编程技巧

WordPress优化用户注册体验自定义密码

2023-6-4 0:00:00

编程技巧

移除WordPress后台GoogleFontAPI链接

2023-6-6 0:00:00

0 条回复 A文章作者 M管理员

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914

Warning: Trying to access array offset on value of type null in /www/wwwroot/dhaomu.com/wp-content/themes/b2/functions.php on line 3914
----《》
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索