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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsRSS Feed out by CategoryRSS Feed out by Category
Previous
 
Next
New Post
6/23/2008 5:58 PM
 

Hi Roberta,

Two things to look at, since the RSS feed uses the modules search functionality.

  1. Have you got 'Enable DNN Search' ticked in module settings?
  2. In 4.0.1, we changed the search functionality so it did not search via a master calendar into a sub-calendar - since events were appearing in 'What's New' (which also uses search) twice.. Consequently anything from a sub-calendar will not appear on an RSS feed for a master calendar.

Cheers
Roger


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
6/23/2008 6:48 PM
 

>Have you got 'Enable DNN Search' ticked in module settings?

Aha - that's the problem - I turned it off, and I recall now that the searchability is what drives this feature for now.

I'll have to think about this as we design this part of our site, as I don't really want these particular events in the search results, but I'm toying with different ways to use feeds.  I don't think this is going to be an issue.

Thanks for the quick tip!

 
New Post
8/4/2008 7:16 PM
 

Ok finally got time to work on this project today.   I think the only problem i have is splitting out reoccuring events.   My category filter and such works fine and i can get the data from the tables but i cant help but think one of your eventsget stored procedures has to have all this reoccuring events stuff handled.   here is what i have so far...

Sadly the data comes up blank.  what is the easiest way to get a list of the next 30 events, starting from today's day, filtered by the category selected. (i have the selection and passing the value stuff handled.  Just need @category in the storedprocedure.  Just dont want to recreate the wheel if this has already been done.

*I am happy to contribute the finished product to the team if you are interested.  I can convert it to VB if necessary.

using

System;

using

System.Configuration;

/* Add these namespaces */

using

System.Data;

using

System.Data.SqlClient;

using

System.Text;

using

System.Xml;

using

DotNetNuke;

using

DotNetNuke.Entities.Portals;

public

partial class _RSS2 : System.Web.UI.Page

{

 

{

 

protected void Page_Load(object sender, EventArgs e)// find out if the query string parameter is present

 

{

 

{

 

{

 

if (Request.QueryString["category"] != null && Request.QueryString["category"] != "")using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["SiteSqlServer"].ToString()))using (SqlCommand cm = new SqlCommand())// get the CategoryId from the query string

 

 

 

int qsCategory = Convert.ToInt32(Request.QueryString["category"]);int qsPortalID = Convert.ToInt32(Request.QueryString["PortalID"]);// set the conenction and query string

cm.Connection = cn;

cm.CommandText =

 

"SELECT [Category], [CategoryName], [PortalID] FROM [EventsCategory] WHERE ([Category] = @Category) And ([PortalID] = @PortalID)";// create parameter for our command and give it a value

 

parmCategories.Value = qsCategory;

 

parmPortalID.Value = qsPortalID;

 

SqlParameter parmCategories = new SqlParameter("@Category", SqlDbType.Int);SqlParameter parmPortalID = new SqlParameter("@PortalID", SqlDbType.Int);// add the parameter to the command object

 

// and open the connection

cm.Parameters.Add(parmCategories);

cm.Parameters.Add(parmPortalID);

cn.Open();

 

// execute the query and return the results to a SqlDataReader

 

 

{

 

SqlDataReader dr = cm.ExecuteReader();if (dr.Read())// clear out the buffer

Response.Clear();

 

// set response content type

Response.ContentType =

 

"text/xml";// delcare and instantiate XMLTextWriter object

 

 

XmlTextWriter xtw = new XmlTextWriter(Response.OutputStream, Encoding.UTF8);// write out the XML declaration and version 1.0 info

xtw.WriteStartDocument();

 

// write out the rss xml element "rss" (required)

xtw.WriteStartElement(

xtw.WriteAttributeString(

 

"rss");"version", "2.0");// write out "channel" element (required)

xtw.WriteStartElement(

 

"channel");// write out title, link, and description based on the feed being requested,

 

// all three elements are required

xtw.WriteElementString(

xtw.WriteElementString(

xtw.WriteElementString(

xtw.WriteElementString(

 

"title", dr["CategoryName"].ToString());"link", "http://www.example.com/");"description", dr["CategoryName"].ToString());"copyright", "Copyright " + DateTime.Now.Year.ToString() + ". All rights reserved.");// close the connection and clear the existing parameters

dr.Close();

cm.Parameters.Clear();

 

// prepare new query

cm.Connection = cn;

cm.CommandText =

cm.CommandType =

 

"EventsGetByRange";CommandType.StoredProcedure;// add parameter and execute query to return article details

 

parmArticles.Value = qsCategory;

cm.Parameters.Add(parmArticles);

 

parmstartdate.Value =

cm.Parameters.Add(parmstartdate);

 

parmenddate.Value =

cm.Parameters.Add(parmenddate);

 

parmmodules.Value =

cm.Parameters.Add(parmmodules);

dr = cm.ExecuteReader();

 

SqlParameter parmArticles = new SqlParameter("@Category", SqlDbType.Int);SqlParameter parmstartdate = new SqlParameter("@BeginDate", SqlDbType.DateTime);DateTime.Today;SqlParameter parmenddate = new SqlParameter("@EndDate", SqlDbType.DateTime);"01.01.2010";SqlParameter parmmodules = new SqlParameter("@Modules", SqlDbType.Int);"0";// Loop through the content of the database and add them to the RSS feed

 

{

xtw.WriteStartElement(

xtw.WriteElementString(

xtw.WriteElementString(

xtw.WriteElementString(

xtw.WriteEndElement();

}

dr.Close();

 

while (dr.Read())"item");"title", dr["EventName"].ToString());"description", dr["EventDesc"].ToString());"link", "http://www.example.com/default.aspx?articleid=" + dr["EventName"]);// Close all tags

xtw.WriteEndElement();

xtw.WriteEndElement();

xtw.WriteEndDocument();

xtw.Flush();

xtw.Close();

}

 

else

{

Response.Write(

}

}

}

}

 

"Non valid RSS feed URL.");else

{

Response.Write(

}

}

}

"Non valid RSS feed URL.");

 
New Post
8/5/2008 3:43 AM
 

Hi Brandon,

Unfortunately recurring events are handled in code not in the stored procedures, and it is complex code. So what you see on the database is what is being passed through the sprocs. I wrote and RSS feed for my site, but fortunately we don't use recurring events, so I just handled the data very simply.

I can if you wish give a simple guide to what the recurrence codes mean in the database.

We do plan in the next release to rework the recurrence mechanisms, and store one record for event recurrence in the database, this will give us other flexibility as well. Unfortunately for you this may be some months off, but it would certainly make your life a lot easier.

Cheers
Roger


DNN MVP
Events - Get the latest version - Upgrade now!!
Feedback 6.4.2 - Now available - Give it a go!
Find us on Codeplex - DNN Events, DNN Feedback
Requirements/Bugs - Please submit them on Codeplex
 
New Post
8/5/2008 8:39 AM
 

no sweat i was just being lazy :) you know how it is.  You think your going to write something in just a couple hours and suddenly you end up grinding on it cause of something you failed to notice.  The recurrence code is pretty logical, and i guess i could rewrite the arrays and such to populate the lists but i am also looking at simply using the datagrid within the list module to generate the xml from it.  Why redo all that work when you have already populated the datagrid there and the user has all the settings available to them?   One of the other slow downs is the fact that the category select feature references the name and not the ID.   I did get all my rss code worked out so all i really need to do is see about connecting the datagrid stuff to it.  I will see how far i get today.

I like the idea of single instance storing of the recurring events.  I know that will make outlook sync a lot easier.  Sadly sounds like a lot of work for you all :(

bj

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsRSS Feed out by CategoryRSS Feed out by Category


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