主題: 如何讓 RSS 只顯示文章的內文部分,而不要顯示延伸內文? 作者: tenz 於 九月 11, 2005, 11:17:23 下午 pLog產生的RSS都是包含整篇文章,這樣很長又佔空間。我試著把 ./class/action/rssaction.class.php 做以下修改:
(加上 // 的部分) 程式碼: $postText = $article->getIntroText(); // $postExtendedText = $article->getExtendedText(); $pm->notifyEvent( EVENT_TEXT_FILTER, Array( "text" => &$postText )); // $pm->notifyEvent( EVENT_TEXT_FILTER, Array( "text" => &$postExtendedText )); $article->setIntroText( $postText ); // $article->setExtendedText( $postExtendedText ); array_push( $articles, $article ); 可是無效,RSS 還是包含會整篇文章。請問該如何修改才對?謝謝! 主題: Re: 如何讓 RSS 只顯示文章的內文部分,而不要顯示延伸內文? 作者: markwu 於 九月 12, 2005, 06:08:57 上午 把 rss 模版中的
程式碼: $post->getText() 改為 程式碼: $post->getIntroText() // 顯示內文 或是 程式碼: $post->getExtentedText() // 顯示延伸內文 其他相關 method 請參考:http://lifetype.org.tw/api/dd/de6/classArticle.html Mark |