1,只是针对dedecms 4.0的文章频道;
2,牺牲关键词字段(keywords),空格分隔变成以“|”分隔,这样就可以tag有空格的词了;
3,增加了tag.php和tag.htm,使用了rewrite,规则如下:
RewriteRule ^(.*)/tag/([^/]*)$ $1/plus/tag\.php\?keyword=$2
RewriteRule ^(.*)/tag/([^/]*)/(\d)$ $1/plus/tag\.php\?keyword=$2&PageNo=$3
4,在你的文章模版article_article.htm里找个适当的地方放tag的输出
Tags:{dede:field name='keywords' runphp='yes' }
if(!empty(@me)){
$kws = explode('|',@me);
@me = "";
foreach($kws as $k){
@me .= "<a href='/tag/".urlencode($k)."'>$k</a> ";
}
@me= str_replace('+', ' ',trim(@me));
}
{/dede:field}
2007.8.13
修正一些报错的问题
修正自动获取关键字的问题
增加文档关键字随机高亮+链接功能
只处理前2个相同的,避免链接泛滥
游客
非常好 2009-11-22