DedeCMS系统默认的是在文章的上一篇和下一篇的链接只显示标题,但是有时我们希望显示其他信息,香港虚拟主机,比如文章的摘要。找到arc.archives.class.php文件,在include目录下面,香港空间,香港服务器,然后查找“GetPreNext”这个函数,将
$query
改成:
$query
比较一下其实现在只是多了arc.description,这就是文章的摘要,也称为文章描述。
需要注意的是这里的jcode_archives和jcode_arctype中的jcode_是我表结构的前缀,你需要将这个前缀改成你自己的。
现在我们已经将文章描述从数据库里面取出来了。下一步将描述显示在页面上,显示连接文字的代码本来是这样的,你可以通过查找找到,其实就在上面那段代码的附近:
$preRow)){$mlink $preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$$$$$nextRow)){$mlink $nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$$$$
现在为了显示出文章描述,在每一个a标签之后添加一个div div中包含文章描述:
$preRow)){$mlink $preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$preRow$$$$$nextRow)){$mlink $nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$nextRow$$$$
这样做的话能显示文章摘要,但是格式可能会很乱,你可以根据需要增加样式。
也许叔本华是对的,人与人的距离太远会寂寞到寒冷,