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

织梦CMS不显示未审核文档的TAG的方法

织梦CMS不显示未审核文档的TAG的方法。dedecms教程织梦教程不显示未审核文档的TAG的方法!未审核文档的TAG会显示在TAG列表页面, 固然点击进入TAG时, 相关的未审核文章不会显示出来,这样对用户体验是很不好的。

dedecms教程织梦教程不显示未审核文档的TAG的方法!未审核文档的TAG会显示在TAG列表页面, 固然点击进入TAG时, 相关的未审核文章不会显示出来,这样对用户体验是很不好的。

DEDECMS暂时没有提供这个功能,所以要解决这个问题, 让DEDECMS不显示未审核文档的TAG, 就要修改TAG的显示库文件tag.lib.php

方法一

打开 /include/taglib/tag.lib.php 文件

找到

if(!empty($typeid))
{
$addsql = " where typeid='$typeid' ";
}

修改为

$dsql->SetQuery("Select tid From `dede_taglist` where arcrank<=-1");  
        $dsql->Execute();
        $ids = '';
        while($row = $dsql->GetArray())
        {
            $tid = $row['tid'];
            $cquery = "Select count(*) as dd From `dede_taglist` where tid = $tid and arcrank<=-1";
            $crow = $dsql->GetOne($cquery);
            if(!$crow['dd'])
            {
                $ids .= ( $ids=='' ? $row['tid'] : ','.$row['tid'] );
            }
        }
        if($ids != '')
        {
            $addsql= " where id not in($ids) ";
        }
        if(!empty($typeid))
        {
            if($addsql)
            {
                $addsql= " and typeid='$typeid' ";
            }else{
                $addsql= " where typeid='$typeid'" ;
            }
        }

方法二

找到

$row['keyword'] = $row['tag'];

在其前面增加

$rankrowss = $dsql -> GetOne("SELECT count(tid) as rankcount FROM `js_taglist` WHERE tid = $row[id] and arcrank >= 0");
if($rankrowss[rankcount] == 0) continue;

通过以上两种方法就可以实现不显示未审核文档的tag了

温馨提示:
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:duhaomu@163.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明

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

织梦教程将文章和图集里图片的ALT注释修改为文章标题的方法

2023-10-21 0:00:00

编程技巧

织梦中万能标签loop不能输入URL的解决方法

2023-10-23 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
----《》
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索