|
1、找到系统-系统基本参数-核心设置-关键字替换(是/否)使用本功能会影响HTML生成速度:是/否;选自是;
在找到其他设置下-文档内容同一关键词替换次数(0为全部替换):设置替换关键词次数;
2、找到下面代码
- $body = preg_replace("/(<a(.*))(>)(.*)(<)(\/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 dede_keywords where keyword='$k' And rpurl<>'' ");
- if(is_array($myrow))
- {
- $karr[] = $k;
- $GLOBALS['replaced'][$k] = 0;
- $kaarr[] = "<a href='{$myrow['rpurl']}'><u>$k</u></a>";
- }
- $i++;
- }
- }
复制代码
替换成下面的代码:
- global $dsql;
- $query="SELECT * FROM dede_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[] = "<a href='$key_url' target='_blank' style='COLOR: #FC4679; border-bottom:1px dashed #FC4679;'><u>$key</u></a>";
- }
复制代码
好了就这么简单就搞定了; |
|