CS Nuggets

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

June 2007 - Posts

CS2007: What features would you like to see in the Event Calendar control?

Ok, I just created the forum thread, What features would you like to see in the Event Calendar control?  I'd like everyone to chime in here.  Most of the requests will most likely only be possible in the commercial version of the control, but if I can add a feature rather easily to the free version, I'll do it.  I'd like Dave Burke, Dan Bartels, and maybe even Jose Lima and Scott Watermask to chime in here.  Lets see if I we can get them to post some thoughts.  Devil

Comments to this post have been disabled so that all posts will be added to the forum thread (link above).

CS2007: Temporary Bug Fix for Forum Posts

UPDATE 06/12/2007:  Telligent has released SP2 for CS 2007 which contains this fix. 

There is a bug in CS 2007 where many of the properties of a forum post are not set prior to executing the post events.  If you are using the SDK, you can make the following changes yourself to correct the issue until Telligent is able to provide a patch.  If you are not using the SDK, you will have to wait for Telligent to provide a patch as it is a license violation for me to do this for you.  Here is the change:

File: CommunityServerForums20/Controls/Forms/CreateEditForumPostForm.cs:

Around line 909:

After the following lines:

post.Username = editedPost.Username;
post.UserID = editedPost.UserID;
post.IsIgnoredPost = editedPost.IsIgnoredPost;

insert the following lines:

//TODO: Missing properties
post.Categories = editedPost.Categories;
post.FormattedBody = editedPost.FormattedBody;
post.ParentID = editedPost.ParentID;
post.SectionID = editedPost.SectionID;
post.ThreadID = editedPost.ThreadID;
post.ThreadDate = editedPost.ThreadDate;
post.ThreadStartDate = editedPost.ThreadStartDate;
post.ThreadStarterUsername = editedPost.ThreadStarterUsername;
post.ThreadIDNext = editedPost.ThreadIDNext;
post.ThreadIDPrev = editedPost.ThreadIDPrev;
post.SortOrder = editedPost.SortOrder;
post.Replies = editedPost.Replies;
post.IsApproved = editedPost.IsApproved;
post.AttachmentFilename = editedPost.AttachmentFilename;
post.Views = editedPost.Views;
post.HasRead = editedPost.HasRead;
post.UserHostAddress = editedPost.UserHostAddress;
post.PostMedia = editedPost.PostMedia;
//post.PostConfigurationValue;
//post.ApplicationPostTypeValue;
post.Name = editedPost.Name;
post.UserTime = editedPost.UserTime;
post.SetSerializerData(editedPost.GetSerializerData());
post.Points = editedPost.Points;
post.TotalRatings = editedPost.TotalRatings;
post.RatingSum = editedPost.RatingSum;
post.PostStatus = editedPost.PostStatus;
post.SpamScore = editedPost.SpamScore;

Posted: Thu, Jun 7 2007 06:47 PM by Bill Bosacker | with no comments
Filed under: ,
CS2007: API Bug & Calendar Update

UPDATE 06/12/2007:  Telligent has released SP2 for CS 2007 which contains this fix. 

UPDATE 06/07/2007: Read CS2007: Temporary Bug Fix for Forum Posts.

A bug in the CS 2007 API was discovered tonight.  When saving an edited forum post, incorrect information is passed to addon modules which makes it impossible to update the calendar and causes the application to crash if the post being saved contains a [cal] tag.  I report the bug in the Community Server Bug forum.

In the mean time, I have created a new build and addressed a couple other issues as well.  The new build will gracefully fail and not update the calendar event until Telligent corrects the issue.  You can run the rebuild script to rebuild the calendar events if you make a change to the forum post that created the event.

Download the current version

Posted: Tue, Jun 5 2007 09:10 PM by Bill Bosacker | with 4 comment(s)
Filed under: ,
CS2007: Event Calendar Features

UPDATE 06/05/2007:
Added support for tags in the form of , 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 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.