dedecms用着挺不错的 不过要做内链的话还得自己手工记录每篇文章的关键词
本想自己写一个 自动生成关键词列表的 结果在网上找了一下 还真有 在这记录一下
<?php
require_once (dirname(__FILE__) . “/include/common.inc.php”);
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title><?php echo $cfg_webname ?> – 关键词列表</title>
<style type=”text/css”>
<!–
body,td,th {
font-size: 80%;
}
–>
</style>
</head>
<body>
<h3><a href=<?php echo $cfg_basehost ?> ><?php echo $cfg_webname ?></a></h3>
<?php
//生成关键字列表
require_once(DEDEINC.”/arc.archives.class.php”);
require_once(DEDEINC.”/channelunit.func.php”);
$dsql->Query(“rs”,”select id from `#@__arctiny` where arcrank > -1 order by id desc”);
while ($rs=$dsql->GetArray(“rs”)){ //循环出记录
$arcid=$rs[id];
$row = $dsql->GetOne(“Select arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,
tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
from `#@__archives` arc left join `#@__arctype` tp on arc.typeid=tp.id
where arc.id=$arcid and arc.arcrank > -1 “);
if($row){
$url = GetFileUrl($row[‘id’],$row[‘typeid’],$row[‘senddate’],$row[‘title’],$row[‘ismake’],
$row[‘arcrank’],$row[‘namerule’],$row[‘typedir’],$row[‘money’],$row[‘filename’],$row[‘moresite’],$row[‘siteurl’],$row[‘sitepath’]);
//echo “print_r <pre>”,print_r($row),”</pre>”;
$keywords=explode(“,”, $row[‘keywords’]);
if($keywords){$keywords[0]=”<strong>”.$keywords[0].”</strong>”; }
echo “<p>[“.$row[‘typename’].’] ‘.$row[‘title’];
foreach($keywords as $keyword ){
echo ” – “.”<a href=$url taget=’_blank’>$keyword</a>”.”$url”;
}
echo “</p>
“;
}
}
?>
</body>
</html>
将上面内容保存为 php文件 然后上传到你的网站根目录 直接访问就ok了