Discuz! 默認 RSS 僅輸出帖子摘要,無後台開關控制。若需輸出完整帖子內容(全文 RSS),需修改源碼。
source/module/forum/forum_rss.php
搜索關鍵字 $attachfile,找到如下邏輯判斷區塊(約第 80-100 行):
if ($attachfile) {
if ($attachfile == 'image') {
// 圖片附件處理
} else {
// 其他附件處理
}
} else {
// 無附件時的摘要輸出邏輯
$message = cutstr($thread['message'], 200); // 這裡截取了前 200 字符作為摘要
}
將上述 else 分支中的摘要截取代碼替換為直接輸出完整 message 字段:
} else {
// 修改為全文輸出
$message = $thread['message'];
}
if ($attachfile) {
if ($attachfile == 'image') {
$message = '[img]'.$attachurl.$thread['attachment'].'[/img]';
} else {
$message = '[attach]'.$thread['aid'].'[/attach]';
}
} else {
// >>> 修改處:直接輸出完整帖子內容 <<<
$message = $thread['message'];
}
// 後續生成 RSS 節點
$rssitem .= ' ';
forum.php?mod=rss&fid=版塊ID 驗證,<description> 節點應包含完整帖子 HTML 內容。forum_rss.php 中的 $rssitemnum 變量)。