CS Nuggets

This blog is for addons, bugs, fixes, and issues pertaining to Community Server.

CS2007: Event Calendar Features

UPDATE 06/05/2007:
Added support for tags in the form of [cal:06/05/2007], added the change to the resources.xml file that was left out, and changed the formatting of dates to require MM/DD/YYYY.  Leading zeros are no longer optional.

To use this control, you will need to place the following register line at the top of your page:

<%@ Register TagPrefix="WGB" Namespace="WGB.CSAddons.Controls" Assembly="WGB.CSAddons" %>

Here is a typical use of the control:

<WGB:EventCalendar ID="EventCalendar" Tag="div" Width="100%" DayCssClass="dbday" CalendarCssClass="dbcalendar" MonthCssClass="dbmonth" DayHeaderCssClass="dbdayheader" CalendarTitleCssClass="dbtitle" OtherMonthDayCssClass="dbothermonthday" HyperLinkCssClass="dbpostlink" style="text-align: center;" runat="Server" />

 

To add events to the calendar, place either of the following in the body of your post:

  1. A single [cal/] tag will use the post/publish date of the post to create a calendar event.
  2. [cal]MM/DD/YYYY[/cal] (leading zeros are required) entry will create a calendar event based on the date within the [cal] tag pair.

Blog, Forum, File, and Gallery posts that contain one of the above [cal] tag entries, will have an event added to the calendar.  The event will display in the calendar as a text link of the subject text that links to the post.  Birthday links with link to user page of the user.  If a post or user profile is editted or deleted, the coresponding event will be updated or deleted as well.

Block moves and deletes, such as deleting or moving an entire forum, do not execute the CS API events.  This results in orphaned records (which will not display on the calendar) and unregistered events in the case of a move.  To rebuild the event tables, the RebuildCalendarEvents.sql script can be run at any time.  This script will remove all existing calendar events from the tables and then go through every post and user to rebuild them.

Standard ComponentArt Calendar CSS Class Properties

  • CalendarCssClass
  • CalendarTitleCssClass
  • DayCssClass
  • DayHeaderCssClass
  • MonthCssClass
  • OtherMonthDayCssClass
  • TodayDayCssClass

Other ComponentArt Calendar Properties

  • MonthPadding
  • MonthSpacing

Calendar Event Hyperlink Properties

  • HyperLinkCssClass
  • HyperLinkTarget

Special Properties

  • DayNameFormat
    • FirstLetter - The days of the week displayed with just the first letter. For example, M represents Monday.
    • FirstTwoLetters - The days of the week displayed with just the first two letters. For example, Mo represents Monday.
    • Full - The days of the week displayed in full format. For example, Monday.
    • Short - The days of the week displayed in abbreviated format. For example, Mon represents Monday.
    • Shortest - The days of the week displayed in the shortest abbreviation format possible for the current culture.
  • ExcludeBirthdays - Determines if birthdays will be excluded from the calendar.
  • Height
  • HyperLinkCssClass
    • If there is a need, I can break this up into to multiple properties.  One for Post events, and one for Birthday events.
  • Width

Internal Controls

  • DisplayConditions
    • Standard Chameleon control. 
  • LeaderTemplate
    • Standard Chameleon control. 
  • LoadingPanelClientTemplate
    • This allows you to replace the default twisting ring that displays during AJAX calls.
  • TrailerTemplate
    • Standard Chameleon control.

In about a month I will be starting development on a commercial version of this control that will provide functionality similar to that in Outlook.  Users will be able to create personal events on their calendar and share those events with other users.  If you have any suggestions for new abilities that you would like to see added to either the free or commercial control, please post a comment here.  I'll post more on the commercial control at a later date.

Comments

interscape said:

I think instead of the [cal][/cal] tags, it would work like the other modules for TextParts, in this format: [cal: 6/1/2007]

Also, if you change the date after it's posted, does your component automatically update the date in the database? What about if you delete the tag from the post?

# June 1, 2007 10:49 PM

Bill Bosacker said:

The reason that [cal]date[/cal] is being used, is for backwards compatability with Dan Bartels CS 2.x control.  I'll look into your suggestion, but I think that it may cause confusion as the tags are designed to be an extension to BBCodes.

As for automatically updating, yes they do.  The birthday events do as well, if you change the birthdate setting in your profile.

There is; however, an issue with deleting or moving a forum.  If you delete or move a forum, the events won't be updated as the system does not process any events for these block changes which will leave orphaned records in the table.  If this happens, you may want to re-run the RebuildCalendarEvents.sql script, which will remove all of the records from the tables and rebuild them.

# June 1, 2007 11:08 PM

AndrewOrange said:

Hi there. My company might well be in the market for a commerical version of your event calendar for CS 2007.

I have to confess that I'm struggling to get my head round what it does - is there somewhere I can see the existing version in action, and maybe have a play?

Thanks

# June 11, 2007 4:13 AM

Bill Bosacker said:

Hey Andrew,

This addon basically does two things, gives you the ability to turn a post (blog, forum, file, or gallery) into a calendar event, plus it turns the birthdays of users into calendar events as well.  The current control is free for anyone to use, just download and install it.

The commercial version will be released later this year and will contain some Outlook type functionality in addition to what the current control provides.  Things like personal calendars, event sharing, as well as other features.

Take it easy,

Bill

# June 11, 2007 7:07 PM

razzamataz2 said:

You said your CS2007 Calender is compatible with Dan Bartels' Calender control. Does that mean that I can use your control in my CS2.1 SP3 installation?

Thanks,

Razza

# June 21, 2007 5:51 AM

Bill Bosacker said:

Hi Razza, if you upgrade to CS 2007, the answer is yes.  The control is a Chameleon control, which is not supported in any version prior to CS 2007.  Dan Bartel's CS 2.x control is currently the only solution for CS 2.x.

-Bill

# June 21, 2007 2:26 PM

dbruyere said:

Is it possible to have an event last more than 1 day?

# August 3, 2007 12:08 PM

Bill Bosacker said:

No, but you can add multiple [cal] tags to a single post.

# August 4, 2007 12:43 AM

supersri said:

Hi,

  For some reason the non-admin logins cannot view the calendar.  They get "Not Found: Forum Not Found

The forum you requested does not exist."  Am I doing something wrong.  I tried Dan's version and I get eh same error.  Please help.  I am almost there.

# August 16, 2007 3:11 PM

Bill Bosacker said:

Are the users able to read the forum directly?  It sounds like you have not given them permission to read the forum where the posts are.  Make sure they can navigate to the post w/o using the calendar.  If they can't, you will need to fix the permissions.

# August 16, 2007 5:59 PM

Qingsong said:

How to control the height?

I am using the Height="1000px" in the WGB:EventCalendar property, but the calendar still cut off the dates if there are too many events in one day.

Can we define the "Auto" for the heights?  Which means the control will auto-expand to hold all the events and all the date in one month.

Thanks,

Qingsong

# October 8, 2007 9:21 AM

Bill Bosacker said:

Hi Qingsong.  I just tried it myself and it seems to be working as expected.  Changing the Height to 1000 attribute does make the calendar area longer.  The actual calendar is being created by the ComponentArt control.  The control does not support an Auto feature that I am aware of.  Have you tried setting the Height to 2000?

As I said before, it appears that you are attempting to use the calendar in a way that it was not designed to be used and is not supported by ComponentArt.  I would seriously reconsider the way that you are using it and think about alternatives.

# October 10, 2007 9:53 AM

flynnjo said:

Hello... I am new to this and could use some help.  I installed the calendar and it shows up fine.  I added a test post with the cal tags but nothing shows up on the calendar... any ideas

# March 11, 2008 9:08 AM

Bill Bosacker said:

Hi flynnjo.  Did you place the tags in the body of the message?

# March 11, 2008 12:19 PM

superedge said:

hi,

I downloaded your calendar control and I am trying to make it work in my local CS installation. I did all as you mentioned in the readme.txt file but I still can't see the calendar tab in my homepage. anything else I might be missing?

cheers,

-Edge

# April 13, 2008 6:45 AM

Bill Bosacker said:

Hi Edge,

It looks like I left out one step, which I'll add to the ReadMe.txt file.  Step 7 should read that you need to merge the SiteUrls_merge.config file into your SiteUrls.config file.  That is what adds the Calendar tab to you menu.

Take it easy,
Bill

# April 13, 2008 9:12 AM

reyza said:

Is possible to add calendar control in sidebar like at www.getinspiredhere.net

# June 7, 2008 12:25 AM

Bill Bosacker said:

Hi reyza,

The answer there is no.  That is a completely different type of calendar and functionality.  The functionality that that site is using is already a part of Community Server.  It is just one of the many blog themes available, though they are using a custom one.  Check out the diffent blog themes to do what they are doing there.

Take it easy,
Bill

# June 7, 2008 9:44 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)