Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Events Module [...  RSS Feed out by Category
Previous Previous
 
Next Next
New Post 6/23/2008 2:58 PM
User is offline Roger Selwyn
948 posts
www.thedivingclub.co.uk
7th Ranked




Re: RSS Feed out by Category 

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


Events 4.0.2 - It's released !! - See the annoucement.
Requirements/Bugs - Submit them here - Gemini - Raise against project 'DNNP', and put 'Events' in the title.
 
New Post 6/23/2008 3:48 PM
User is offline Roberta Freese
81 posts
10th Ranked


Re: RSS Feed out by Category 

>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 4:16 PM
User is offline Brandon Jelinek
30 posts
www.jelpro.com
10th Ranked


Re: RSS Feed out by Category 

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 12:43 AM
User is offline Roger Selwyn
948 posts
www.thedivingclub.co.uk
7th Ranked




Re: RSS Feed out by Category 

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


Events 4.0.2 - It's released !! - See the annoucement.
Requirements/Bugs - Submit them here - Gemini - Raise against project 'DNNP', and put 'Events' in the title.
 
New Post 8/5/2008 5:39 AM
User is offline Brandon Jelinek
30 posts
www.jelpro.com
10th Ranked


Re: RSS Feed out by Category 

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 Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Events Module [...  RSS Feed out by Category
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Where Every Home is an Investment
Where Every Home is an Investment
www.nestbrokers.com
Faculty of Graduate and Postdoctoral Studies
At the graduate level, the University of Ottawa offers more than 180 graduate certificates, master's degrees and PhDs, as well as interdisciplinary programs such as Women's Studies and Canadian Studies. Many postdoctoral opportunities are available in both the sciences and the humanities. For further information, please consult the site of the Faculty of Graduate and Postdoctoral Studies.
www.grad.uottawa.ca
Vekkin Solutions
Vekkin Solutions provides complete website solutions and custom module development to churches and small businesses.
www.vekkin.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP