📄 rss.jsp
字号:
<?xml version="1.0" encoding="utf-8" ?>
<%@ page contentType="text/xml;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="net.myvietnam.mvncore.util.*" %>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.db.*" %>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.MyUtil" %>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.user.UserModuleConfig" %>
<%@ include file="inc_common.jsp"%>
<%
//@todo <image> and <textInput>
Collection threadRows = (Collection) request.getAttribute("ThreadBeans");
int forumID = ((Integer)request.getAttribute("ForumID")).intValue();
String prefix = ParamUtil.getServerPath() + contextPath + UserModuleConfig.getUrlPattern();
String logoUrl = ParamUtil.getServerPath() + contextPath + "/mvnplugin/mvnforum/images/logo.gif";
String channelLink = prefix + "/index";
String channelTitle;
String channelDesc;
if (forumID > 0) {
// Forum specific RSS
ForumCache forumCache = ForumCache.getInstance();
String forumName = forumCache.getBean(forumID).getForumName();
channelTitle = ParamUtil.getServerPath() + " (Forum: " + forumName + ")";
channelDesc = "RSS Feed of " + channelTitle;
} else {
// global RSS
channelTitle = ParamUtil.getServerPath();
channelDesc = "RSS Feed of " + channelTitle + " (Global RSS)";
}
%>
<rss version="0.91">
<channel>
<title><%=channelTitle%></title>
<link><%=prefix%>/index</link>
<description><%=channelDesc%></description>
<language>en-us</language>
<image>
<title>mvnForum</title>
<url><%=logoUrl%></url>
<link><%=prefix%>/index</link>
<width>141</width>
<height>50</height>
<description>mvnForum - free open source Jsp/Servlet forum</description>
</image>
<textInput>
<title>Search</title>
<description>Search all posts</description>
<name>SearchText</name>
<link><%=prefix%>/search</link>
</textInput>
<%
for (Iterator iterator = threadRows.iterator(); iterator.hasNext(); ) {
ThreadBean threadBean = (ThreadBean)iterator.next(); %>
<item>
<title><%=MyUtil.filter(threadBean.getThreadTopic(), false/*html*/, false/*emotion*/, false/*mvnCode*/, false/*newLine*/, false/*URL*/)%></title>
<link><%=prefix%>/viewthread?thread=<%=threadBean.getThreadID()%></link>
<description><%=MyUtil.filter(StringUtil.getShorterString(threadBean.getThreadBody(), 400), false/*html*/, false/*emotion*/, false/*mvnCode*/, false/*newLine*/, false/*URL*/)%></description>
</item>
<% }//while%>
</channel>
</rss>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -