discuz門戶發布全文RSS方法
找到/source/module/portal/portal_rss.php
if($catarray) {
$alldata = C::t('portal_rsscache')->fetch_all_by_catid($catarray, $num);
if($alldata) {
foreach($alldata as $article) {
if(TIMESTAMP - $article['lastupdate'] > $ttl * 60) {
updatersscache($num);
break;
} else {
list($article['description'], $attachremote, $attachfile, $attachsize) = explode(" ", $article['description']);
if($attachfile) {
if($attachremote) {
$filename = $_G['setting']['ftp']['attachurl'].'portal/'.$attachfile;
} else {
$filename = $_G['siteurl'].$_G['setting']['attachurl'].'portal/'.$attachfile;
}
}
echo "
".
"
".
" $_G[siteurl]".($rewriteflag ? rewriteoutput('portal_article', 1, '', $article[aid]) : "portal.php?mod=view&aid=$article[aid]")."
".
"
".
" ".dhtmlspecialchars($article['catname'])."
".
" ".dhtmlspecialchars($article['author'])."
".
($attachfile ? ''."
" : '').
" ".gmdate('r', $article['dateline'])."
".
"
";
}
}
} else {
updatersscache($num);
}
}
修改為:
if($catarray) {
$alldata = C::t('portal_rsscache')->fetch_all_by_catid($catarray, $num);
if($alldata) {
foreach($alldata as $article) {
if(TIMESTAMP - $article['lastupdate'] > $ttl * 60) {
updatersscache($num);
break;
} else {
list($article['description'], $attachremote, $attachfile, $attachsize) = explode(" ", $article['description']);
if($attachfile) {
if($attachremote) {
$filename = $_G['setting']['ftp']['attachurl'].'portal/'.$attachfile;
} else {
$filename = $_G['siteurl'].$_G['setting']['attachurl'].'portal/'.$attachfile;
}
}
//$fdata = DB::fetch_first("SELECT * FROM ".DB::table('article_content')." WHERE cid = '$article[id]' and first = 1");
$rs = DB::fetch_first("SELECT * FROM ".DB::table('portal_article_content')." WHERE aid=$article[aid]");
echo "
".
"
".
" $_G[siteurl]".($rewriteflag ? rewriteoutput('portal_article', 1, '', $article[aid]) : "portal.php?mod=view&aid=$article[aid]")."
".
"
".
"
".
" ".dhtmlspecialchars($article['catname'])."
".
" ".dhtmlspecialchars($article['author'])."
".
($attachfile ? ''."
" : '').
" ".gmdate('r', $article['dateline'])."
".
"
";
}
}
} else {
updatersscache($num);
}
}
修改後的RSS文件:


TAG:CitReport |