當前位置:
首頁 > 最新 > discuz門戶發布全文RSS方法

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文件:

喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 CitReport 的精彩文章:

TAG:CitReport |