很多织梦DedeCMS用户需要实现搜索结果按点击量排序,如何解决呢?下面就教大家方法。在/include/arc.searchview.class.php文件467行//排序方式注释下面 //搜索注释以上的代码改成如下代码:
$ordersql = ''; if($this->ChannelType< 0 ||$this->ChannelTypeid< 0){ if($orderby=="id"){ $ordersql="order by arc.aid desc"; }else if($orderby=="senddate"){ $ordersql="order by arc.senddate desc"; }else{ $ordersql=" order by arc.click desc"; } }else{ if($orderby=="senddate") { $ordersql=" order by arc.senddate desc"; } else if($orderby=="pubdate") { $ordersql=" order by arc.pubdate desc"; } else if($orderby=="id") { $ordersql=" order by arc.id desc"; } else { $ordersql=" order by arc.click desc"; } }修改完成后就可以了···赶快试试效果吧!!!