内容摘要指的是文章内容的前 60个字符(也可以是前40个,前50个等等)以 2.7.2版 + 官方默认模板 为例:1)、修改 includes/lib_article.php 文件,搜索
$sql
= 'SELECT article_id, title, author, add_time, file_url, open_type' .
一共能搜到两处,全部都修改为:
$sql
= 'SELECT article_id, title,content, author, add_time, file_url, open_type' .
继续找到:
$arr
[$article_id]['title'] = $row
['title'];
在它下面增加一行代码
$arr
[$article_id]['content'] = strip_tags($row
['content']);
2)、打开 模板文件 /themes/default/article_cat.dwt 找到代码
{$article.short_title}
</a>
在它后边增加代码
<br>{$article.content|truncate:60}
转载于:https://www.cnblogs.com/wangblognet/archive/2012/09/26/2703882.html
相关资源:数据结构—成绩单生成器