POST TIME:2020-04-04 16:12
一、開打include/arc.archives.class.php 文件
二、查找 function ReplaceKeyword($kw,&$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[] = "<span style="text-decoration: underline;">$k</span>";
}
$i++;
}
}
四、并在注釋或刪除的代碼下面加入以下代碼:
$dsql = new DedeSql(false);
$query="select * from dede_keywords where rpurl<>'' ";
$dsql->SetQuery($query);
$dsql->Execute();
while($row = $dsql->GetArray())
{
$key = trim($row['keyword']);
$rul=trim($row['rpurl']);
if($rul!="")
if(!in_array($key, $kw))
if(!in_array($kw,$key))
if(substr_count($body,$key)<20)
{
$karr[] = $key;
$kaarr[] = "<a href='$rul' title='$key' target='_blank'>$key</a>";
}
}
五、OK,已經(jīng)修改完成了。直接復制上面代碼,文章內(nèi)同樣的關(guān)鍵詞只會出現(xiàn)一個鏈接。
六、一鍵更新網(wǎng)站->更新所有