DEDECMS的全内链方案,所有设置关键词的内链都会在文档中创建,突破keyword的限制。

1.修改系统参数—>核心设置—>关键字替换(是/否)使用本功能会影响HTML生成速度(这里选 是)

2.修改 include/arc.archives.class.php

找到

以下为引用的内容:

$body = preg_replace("/(<a(.*))(>)(.*)(<)(\/a>)/isU", '\\1-]-\\4-[-\\6', $body);
 


在下方加入以下代码

以下为引用的内容:

//设置所有关键词
        $dsql12 = new DedeSql();
        $query1="select * from dede_keywords";
        $dsql12->SetQuery($query1);
        $dsql12->Execute();

          while($kws = $dsql12->GetArray())
        {
 


再找到:

以下为引用的内容:

if($i > $maxkey)
                {
                    break;
                }
 


并删除。

找到

以下为引用的内容:

$body = preg_replace("/(^|>)([^<]+)(?=<|$)/sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body);
 


在其上方加上一个

以下为引用的内容:

}
 


3.核心—>文档关键词维护—>增加一个关键字和链接重新生成文章即可。