Discuz教程网

[代码修改] Discuz 7.2将RSS中的帖子地址实现静态化

[复制链接]
authicon 小白 发表于 2013-4-5 10:52:00 | 显示全部楼层 |阅读模式
rss.php

找到

  1. if($fidarray) {
  2. $query = $db->query("SELECT * FROM {$tablepre}rsscaches WHERE fid IN (".implode(',', $fidarray).") ORDER BY dateline DESC LIMIT $num");
  3. if($db->num_rows($query)) {
  4.   while($thread = $db->fetch_array($query)) {
  5.    if($timestamp - $thread['lastupdate'] > $ttl * 60) {
  6.     updatersscache();
  7.     break;
  8.    } else {
  9.     echo  "    <item>\n".
  10.      "      <title>".dhtmlspecialchars($thread['subject'])."</title>\n".
  11.      "      <link>{$boardurl}viewthread.php?tid=$thread[tid]</link>\n".
  12.      "      <description><![CDATA[$thread[description]]]></description>\n".
  13.      "      <category>".dhtmlspecialchars($thread['forum'])."</category>\n".
  14.      "      <author>".dhtmlspecialchars($thread['author'])."</author>\n".
  15.      "      <pubDate>".gmdate('r', $thread['dateline'])."</pubDate>\n".
  16.      "    </item>\n";
复制代码
将上面中的:
  1.      "      <link>{$boardurl}viewthread.php?tid=$thread[tid]</link>\n".
复制代码
替换为
游客,如果您要查看本帖隐藏内容请回复




上一篇:Discuz 7.2论坛静态sitemap绿色免安装
下一篇:帖子内显示“相关主题”插件 For 7.1(7.2) 2011.10.26新增2款美化
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2024-5-17 06:52

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表