|
What this is
Other links
The source code<?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="com.mvnforum.db.*" %> <%@ page import="com.mvnforum.MyUtil" %> <%@ page import="com.mvnforum.MVNForumConfig" %> <%@ page import="com.mvnforum.user.UserModuleConfig" %> <% request.setAttribute("contentType", "text/xml;charset=utf-8");%> <% Collection threadBeans = (Collection) request.getAttribute("ThreadBeans"); int forumID = ((Integer)request.getAttribute("ForumID")).intValue(); String prefix = ParamUtil.getServerPath() + request.getContextPath() + UserModuleConfig.getUrlPattern(); String logoUrl = ParamUtil.getServerPath() + request.getContextPath() + "/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%> <link><%=prefix%>/index <description><%=channelDesc%> <language>en-us <image> <title>mvnForum RSS <url><%=logoUrl%> <link><%=prefix%>/index <width>141 <height>50 <description>mvnForum - free open source Jsp/Servlet forum </image> <textInput> <title>Search <description>Search all posts <name>key <link><%=prefix%>/search </textInput> <% for (Iterator iterator = threadBeans.iterator(); iterator.hasNext(); ) { ThreadBean threadBean = (ThreadBean)iterator.next(); %> <item> <title><%=MyUtil.filter(threadBean.getThreadTopic(), false/*html*/, false/*emotion*/, false/*mvnCode*/, false/*newLine*/, false/*URL*/)%> <link><%=prefix%>/viewthread?thread=<%=threadBean.getThreadID()%> <description><%=MyUtil.filter(StringUtil.getShorterString(threadBean.getThreadBody(), MVNForumConfig.getMaxCharsInRss()), false/*html*/, false/*emotion*/, false/*mvnCode*/, false/*newLine*/, false/*URL*/)%> </item> <% }//for%> </channel> </rss> |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.