关键字采集文章(后台>系统基本参数>其他选项>>替换替换)
优采云 发布时间: 2021-09-03 16:03关键字采集文章(后台>系统基本参数>其他选项>>替换替换)
操作步骤一起
1、Background>系统>系统基本参数>核心设置>关键字替换(是/否),这里选择“是”。
2、Background>系统>基本系统参数>其他选项>文档内容相同关键词替换次数(0表示全部替换):1
3、Background>采集>文档关键词maintenance,在这里设置关键词和网站链接。
但是这里有一个问题。这只是在添加文章时,Keyword:列中填写的关键字只有链接,
文章中出现的其他“文档关键字”将不会被链接。
如何链接其他关键字?
打开/include/arc.archives.class.php
找到
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[] = "<a href='{$myrow['rpurl']}'>$k</a>";
}
$i++;
}
}
将他替换为:
$query="select keyword,rpurl from #@__keywords where rpurl'' order by rank desc limit 0,$maxkey";
$this->dsql->SetQuery($query);
$this->dsql->Execute();
while($row = $this->dsql->GetArray())
{
$key = trim($row['keyword']);
$rul = trim($row['rpurl']);
if(substr_count($body,$key)系统>基本系统参数>其他选项>文档内容相同关键词replacement次(0表示全部替换):1
根据情况修改,不要太多。
2、if(substr_count($body,$key)
关键词链接数。