最新活动:电脑PC端+手机端+微网站+自适应网页多模板选择-建站388元起价!!!
当前位置:主页 > 网站建设 > 织梦列表页获取热搜排行榜文章,织梦教程

织梦列表页获取热搜排行榜文章,织梦教程

时间:2023-07-17 11:07:17 阅读: 文章分类: 网站建设 作者: 织梦编辑员

导读:织梦教程织梦教程打开织梦/include/extend.func.php 最后加上以下代码: //列表页获取网友热搜 24小时function GetHotSearch($tidede后台模板dede会员中心模板。

dede后台模板dede会员中心模板打开织梦/include/extend.func.php 最后加上以下代码: //列表页获取网友热搜 24小时 function GetHotSearch($tid){ global $dsql; $time = time() - 86400; $sql = "select * from dede_archives where typeid = '$tid' and shorttitle <> '' group by shorttitle order by pubdate desc limit 10"; $dsql->Execute('me',$sql); $li = ''; while($arr = $dsql->GetArray('me')) { if($arr['pubdate&织梦手机模板#39;] >$time ){ $class = 'new'; }else{ $class = ''; } $barr = GetOneArchive($arr['id']); $arcurl = $barr['arcurl']; $li .= '<li><span class="right"><time class="'.$class.'">'.date('Y-m-d',$arr['pubdate']).'</time></span><a rel="nofollow" target="_blank" href="go.php?url='.$arcurl.'" title="'.$arr['shorttitle'].'">'.$arr['shorttitle'].'</a></li>'; } return $li; } //排行榜获取网友热搜 3天 function hot_3_GetHotSearch($tid){ global $dsql; $time = time() - 86400; $sql = "select * from dede_archives where pubdate > UNIX_TIMESTAMP( CURDATE( ) - INTERVAL 3 day) and typeid = '$tid' and shorttitle <> '' group by shorttitle order by click desc limit 10"; $dsql->Execute('me',$sql); $li = ''; while($arr = $dsql->GetArray('me')) { if($arr['pubdate'] >$time ){ $class = 'new'; }else{ $class = ''; } $barr = GetOneArchive($arr['id']); $arcurl = $barr['arcurl']; $li .= '<li><span class="right"><time class="'.$class.'">'.date('Y-m-d',$arr['pubdate']).'</time></span><a rel="nofollow" target="_blank" href="go.php?url='.$arcurl.'" title="'.$arr['shorttitle'].'">'.$arr['shorttitle'].'</a></li>'; } return $li; } //排行榜获取网友热搜 7天 function hot_7_GetHotSearch($tid){ global $dsql; $time = time() - 86400; $sql = "select * from dede_archives where pubdate > UNIX_TIMESTAMP( CURDATE( ) - INTERVAL 7 day) and typeid = '$tid' and shorttitle <> '' group by shorttitle order by click desc limit 10"; $dsql->Execute('me',$sql); $li = ''; while($arr = $dsql->GetArray('me')) { if($arr['pubdate'] >$time ){ $class = 'new'; }else{ $class = ''; } $barr = GetOneArchive($arr['id']); $arcurl = $barr['arcurl'];dede,模板 $li .= '<li><span class="right"><time class="'.$class.'">'.date('Y-m-d',$arr['pubdate']).'</time></span><a rel="nofollow" target="_blank" href="go.php?url='.$arcurl.'" title="'.$arr['shorttitle'].'">'.$arr['shorttitle'].'</a></li>'; } return $li; } //排行榜获取网友热搜 30天 function hot_30_GetHotSearch($tid){ global $dsql; $time = time() - 86400; $sql = "select * from dede_archives where pubdate > UNIX_TIMESTAMP( CURDATE( ) - INTERVAL 30 day) and typeid = '$tid' and shorttitle <> '' group by shorttitle order by click desc limit 10"; $dsql->Execute('me',$sql); $li = ''; while($arr = $dsql->GetArray('me')) { if($arr['pubdate'] >$time ){ $class = 'new'; }else{ $class = ''; } $barr = GetOneArchive($arr['id']); $arcurl = $barr['arcurl']; $li .= '<li><span class="right"><time class="'.$class.'">'.date('Y-m-d',$arr['pubdate']).'</time></span><a rel="nofollow" target="_blank" href="go.php?url='.$arcurl.'" title="'.$arr['shorttitle'].'">'.$arr['shorttitle'].'</a></li>'; } return $li; } //列表页获取栏目关注 30天 14条 function hotword_30_GetHotSearch($tid){ global $dsql; $time = time() - 86400; $sql = "select * from dede_archives where pubdate > UNIX_TIMESTAMP( CURDATE( ) - INTERVAL 90 day) and typeid = '$tid' and shorttitle <> '' group by shorttitle order by click desc limit 14"; $dsql->Execute('me',$sql); $li = ''; while($arr = $dsql->GetArray('me')) { if($arr['pubdate'] >$time ){ $class = 'new'; }else{ $class = ''; } $barr = GetOneArchive($arr['id']); $arcurl = $barr['arcurl']; $li .= '<a rel="nofollow" target="_blank" href=&qdede免费模板uot;go.php?url='.$arcurl.'" title="'.$arr['shorttitle'].'">'.$arr['shorttitle'].'</a>'; } return $li; }

关键词标签: 标签 织梦 排行榜

声明: 本文由我的SEOUC技术文章主页发布于:2023-07-17 ,文章织梦列表页获取热搜排行榜文章,织梦教程主要讲述排行榜,标签,织梦网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_28677.html

我的IDC 网站建设技术SEOUC.COM
专注网站建设,SEO优化,小程序设计制作搭建开发定制网站等,数千家网站定制开发案例,网站推广技术服务。
  • 5000+合作客服
  • 8年从业经验
  • 150+覆盖行业
  • 最新热门源码技术文章