在module.php找到文章标签替换以下内容即可以解决
替换方法:
module.php搜索找到//blog:文章标签,把原来代码替换复制下面代码(注意:防万一,记得备份)
//blog:文章标签 function blog_tag($blogid){ global $CACHE; $tag_model = new Tag_Model(); $log_cache_tags = $CACHE->readCache('logtags'); if (!empty($log_cache_tags[$blogid])){ $tag = ''; foreach ($log_cache_tags[$blogid] as $value){ $tag .= " <a href=\"".Url::tag($value['tagurl'])."\">".$value['tagname'].'</a>'; } echo $tag; } else { $tag_ids = $tag_model->getTagIdsFromBlogId($blogid); $tag_names = $tag_model->getNamesFromIds($tag_ids); if ( ! empty($tag_names)){ $tag = ''; foreach ($tag_names as $key => $value) { $tag .= " <a href=\"".Url::tag(rawurlencode($value))."\">".htmlspecialchars($value).'</a></li>'; } echo $tag; }else{ echo '这篇文章木有标签'; } } }
发表评论