.
织梦dede教程:不显示未审核文档的TAG的方法
2024-04-08
24
未审核文档的TAG会显示在TAG列表页面, 固然点击进入TAG时, 相关的未审核文章不会显示出来, 这样对用户体验是很不好的. DEDECMS暂时没有提供这个功能,所以要解决这个问题, 让DEDECMS不显示未审核文档的TAG, 就要修改TAG的显示库文件 tag.lib.php。
方法一
打开 /include/taglib/tag.lib.php 文件
找到
| 03 | $addsql = " where typeid='$typeid' "; |
| 06 | $dsql->SetQuery("Select tid From `dede_taglist` where arcrank<=-1"); |
| 09 | while($row = $dsql->GetArray()) |
| 12 | $cquery = "Select count(*) as dd From `dede_taglist` where tid = $tid and arcrank<=-1"; |
| 13 | $crow = $dsql->GetOne($cquery); |
| 16 | $ids .= ( $ids=='' ? $row['tid'] : ','.$row['tid'] ); |
| 21 | $addsql= " where id not in($ids) "; |
| 27 | $addsql= " and typeid='$typeid' "; |
| 29 | $addsql= " where typeid='$typeid'" ; |
|
方法二
找到
| 1 | $row['keyword'] = $row['tag']; |
|
在其前边加入:
| 1 | $rankrowss = $dsql -> GetOne("SELECT count(tid) as rankcount FROM `js_taglist` WHERE tid = $row[id] and arcrank >= 0"); |
| 2 | if($rankrowss[rankcount] == 0) continue; |
|
通过以上两种方法就可以实现不显示未审核文档的tag了
免责声明:以上内容转自其它媒体,相关信息仅为传播更多信息,与本站立场无关。做网站,做小程序,模板小程序不保证该信息(包含但不限于文字、视频、音频、数据及图表)全部或者部分内容的准确性、真实性、完整性、有效性、及时性、原创性等,如有侵权请联系4000-277-886。