1、在dedecms5.6文件中找到系统-系统基本参数-核心设置-关键字替换(是/否)使用本功能会影响HTML生成速度:是/否;选自是;在找到其他设置下-文档内容同一关键词替换次数(0为全部替换):设置替换关键词次数;
2、找到下面代码
- $body = preg_replace("/()(.*)(<)(//a>)/isU", '//1-]-//4-[-//6', $body);
- $body = preg_replace("/(^|>)([^<]+)(?=<|$)/sUe", "_highlight('//2', /$karr, /$kaarr, '//1')", $body);
删除或注释掉这两段代码中间的代码:
- foreach($kws as $k)
- {
- $k = trim($k);
- if($k!="")
- {
- if($i > $maxkey)
- {
- break;
- }
- $myrow = $this->dsql->GetOne("select * from #@__keywords where keyword='$k' And rpurl<>'' ");
- if(is_array($myrow))
- {
- $karr[] = $k;
- $GLOBALS['replaced'][$k] = 0;
- $kaarr[] = "$k";
- }
- $i++;
- }
- }
替换成下面的代码:
- global $dsql;
- $query="SELECT * FROM #@__keywords WHERE rpurl<>'' ORDER BY rank DESC";
- $dsql->SetQuery($query);
- $dsql->Execute();
- while($row = $dsql->GetArray())
- {
- $key = trim($row['keyword']);
- $key_url=trim($row['rpurl']);
- $karr[] = $key;
- $kaarr[] = "$key";
- }
新闻热点
疑难解答