把DEDE,RSS的描述改成全文内容输出

dedecms原来生成的xml只是包含了文章的摘要,没有原文.用来做feed一点吸引力都没有.
当然有了具体内容也可以为别人提供咨讯,如百度新闻,GG等.

修改方法如下:

1.找rss的模板 templets/plus/rss.htm
[field:description/]
改成
[field:body/]

如果你不改直接增加换成别的名字也可以,
例如:
[field:body/]
2.修改生成rss的php源代码./include/inc_rss_view.php

大概100行左右 或者搜 $query = “Select

直接改成,

$query = “Select

#@__archives.ID,#@__archives.title,#@__archives.source,#@__archives.writer,#@__archives.type

id,#@__archives.ismake,#@__archives.money,

#@__archives.description,#@__archives.pubdate,#@__archives.senddate,#@__archives.arcrank,#@_

_archives.click,
#@__archives.litpic,#@__arctype.typedir,#@__arctype.typename,#@__arctype.isdefault,
#@__arctype.defaultname,#@__arctype.namerule,#@__arctype.namerule2,#@__arctype.ispart,
#@__arctype.siteurl,dede_addonarticle.body
from #@__archives
left join #@__arctype on #@__archives.typeid=#@__arctype.ID
left join #@__addonarticle on #@__archives.ID=#@__addonarticle.aid
where $orwhere $ordersql limit 0,”.$this->MaxRow;
这样基本就OK了,如果觉的内容太多加载的慢,
可以加上下面这段代码,只用第一页的内容作为内容

在这一段 //处理一些特殊字段  下面加上

$row[”body”] = substr($row[”body”], 0, strpos($row[”body”].”#p#”,”#p#”));//lava

其它过滤什么的也可以自己灵活修改.

You May Also Like

About the Author: 邢磊

发表评论

您的电子邮箱地址不会被公开。