Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...RSS issueRSS issue
Previous
 
Next
New Post
2/2/2009 1:43 AM
 

I have a Magazine Module where a person can create articles. Before saving the article, he can set the date on when it will be published, like today, a day from now or a month perhaps.

What I need now is to an updated XML file that will be used as RSS feed for my frequent reader. 

 

There was 2 solution that I thought of.

The first was to create an ASPX page (localhost/dnn/RSS.aspx). Here's just a sample of code behind:

 

 private void Page_Load(object sender, System.EventArgs e)
    {     
        Response.ContentType = "text/xml";
        Response.ContentEncoding = Encoding.UTF8;

        // check to see if a cached version exists
        if (Cache["RssFeed"] == null )
        {
            string s1;
           // code for filling the content of s1 is added here
       
            Cache.Insert("RssFeed", s1, null, DateTime.Now.AddHours(1.5), TimeSpan.Zero);
        }

        Response.Write(Cache["RssFeed"].ToString());
        Response.End();
    }

This worked perfectly fine but I don't know if this will have DNN security issues. Will it?

 

Second solution was to create a DNN Module, where the code-behind will be similar like the one above. The problem with this is when I added the link of this page (localhost/dnn/rss/tabid/500/default.aspx) on a RSS reader, it says that it has incorrect format or not readable. When I check the source of the page, it has this:

<?xml version="1.0"?> <rss version="2.0"><channel><title>Liftoff News</title><link>http://liftoff.msfc.nasa.gov/</link><description>Liftoff to Space Exploration.</description><pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate><lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate><docs>http://blogs.law.harvard.edu/tech/rss</docs><generator>Weblog Editor 2.0</generator><managingEditor>editor@example.com</managingEditor><webMaster>webmaster@example.com</webMaster>      <item>         <title>Star City</title>         <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>         <description>How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's &lt;a href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm"&gt;Star City&lt;/a&gt;.</description>         <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>         <guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>      </item>      <item>         <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a &lt;a href="http://science.nasa.gov/headlines/y2003/30may_solareclipse.htm"&gt;partial eclipse of the Sun&lt;/a&gt; on Saturday, May 31st.</description>         <pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>         <guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>      </item>    </channel></rss><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html  lang="en-US">
<head id="Head">
<!--**********************************************************************************-->
<!-- DotNetNuke� - http://www.dotnetnuke.com                                          -->
<!-- Copyright (c) 2002-2008                                                          -->
<!-- by DotNetNuke Corporation                                                        -->
<!--**********************************************************************************-->
<meta id="MetaDescription" name="DESCRIPTION" content="RSS" /><meta id="MetaKeywords" name="KEYWORDS" content=",DotNetNuke,DNN" /><meta id="MetaCopyright" name="COPYRIGHT" content="Copyright 2007 by My Website" /><meta id="MetaGenerator" name="GENERATOR" content="DotNetNuke " /><meta id="MetaAuthor" name="AUTHOR" content="My Website" /><meta name="RESOURCE-TYPE" content="DOCUMENT" /><meta name="DISTRIBUTION" content="GLOBAL" /><meta name="ROBOTS" content="INDEX, FOLLOW" /><meta name="REVISIT-AFTER" content="1 DAYS" /><meta name="RATING" content="GENERAL" /><meta http-equiv="PAGE-ENTER" content="RevealTrans(Duration=0,Transition=1)" /><style id="StylePlaceholder" type="text/css"></style><link id="_DotNetNuke_Portals__default_" rel="stylesheet" type="text/css" href="/DotNetNuke/Portals/_default/default.css" /><link id="_DotNetNuke_Portals__default_Skins_Mortgage_" rel="stylesheet" type="text/css" href="/DotNetNuke/Portals/_default/Skins/Mortgage/skin.css" /><link id="_DotNetNuke_Portals_0_" rel="stylesheet" type="text/css" href="/DotNetNuke/Portals/0/portal.css" /><title>
    RSS
</title></head>
<body id="Body">

....

 


</body>
</html>

it seems like that the DNN structure is added though I used the function Response.End().

I tried to use a skin where it will just have the div tag for Content Pane, but still it's still shows the DNN structure.

 

Neither creating an XML file manually, nor creating a module that will create an XML file automatically is an option. It's because the admin does not know exactly when there will be a newly published article and it'll be hassle if he'll always check the CMS for such.

 

With this, are there any solutions? If so, how?

 

Thanks in advance

 

 
New Post
2/2/2009 4:24 PM
 

RGM-
Your first solution is very similar to the existing DNN solution for generating search-engine-friendly sitemaps (SITEMAP.ASPX and SITEMAP.ASPX.VB in your root DNN folder).  I think you should be fine with this solution.

Also...

Check into the free service from feedburner.google.com.  Feedburner acts as a middleman for your feed with many benefits.  A few notables are:

  • Get subscription stats for your feed and for individual links within the feed
  • Allows you to change feed source (say, to a different module with a different fully-qualified URL) without affecting (losing) subscribers
  • Caches your feed so subscribers use up Feedburner's bandwidth instead of yours.  Feedburner checks your feed every 30 minutes for new content.
  • Your feed stays up (most recently-cached version) even while your site is down.

Cheers!
-mamlin


esmamlin atxgeek.me
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...RSS issueRSS issue


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out