我也是自己修改了一下summary里的sql语句,通过这个show in summary就可以控制blog的article不在summary里显示出来了。
可以請問一下這個功能要怎麼修改嗎
麻煩了
class/summary/dao/summarystats.php
254行
function getRecentArticles( $maxPosts, $ignoreTopic = "", $ignoreText = "" )
{
$prefix = $this->getPrefix();
$query = "
修改这里面的sql。
改成
$query = "SELECT a.id as id, a.id,t.topic,t.text,a.date,
a.user_id,a.blog_id, a.status, a.properties,
a.num_reads, a.slug
FROM {$prefix}articles a,
{$prefix}articles_categories c,
{$prefix}article_categories_link l,
{$prefix}articles_text t,
{$prefix}blogs b
WHERE t.article_id = a.id
AND TO_DAYS(NOW()) - TO_DAYS(a.date) < 100
AND l.article_id = a.id
AND l.category_id = c.id
AND c.in_main_page = 1
AND a.blog_id = b.id
AND b.status = ".BLOG_STATUS_ACTIVE."
AND a.status = ".POST_STATUS_PUBLISHED."
AND b.show_in_summary = 1
AND a.date < NOW()";
就是多一个AND b.show_in_summary = 1