Sidebar Calendar?

rated by 0 users
This post has 13 Replies | 3 Followers

Top 150 Contributor
Posts 151
Points 2,495
CFAITH Posted: Tue, Jan 23 2007 5:14 PM
I have seen a lot of CS sites add a calendar to the right sidebar (like gamerscoreblog, for example). Does anyone know how this is accomplished? Is there another module out there besides Dan Bartel's CS Calendar? Thanks!
--Bisnut
Top 25 Contributor
Posts 1,879
Points 37,940
CS Developers
Jose Lema replied on Tue, Jan 23 2007 8:23 PM

Many of those sites, I suspect, are single blog sites. As such, they're using the WeblogCalendar control. I believe in CS 2.1 we dropped this control from all the blog themes, but you should be able to drop it into the sidebar and it'll work automagically.

To add the calendar to the [default] blog theme, open Web\Themes\Blogs\[default]\Skins\Skin-BlogSideBar.ascx and add the following:

<div id="WeblogCalendarSideBar">
    <Blog:WeblogCalendar runat="server" />
</div>
Hope that helps...

One is glad to be of service...

Jose Lema

  • | Post Points: 35
Top 150 Contributor
Posts 151
Points 2,495
CFAITH replied on Tue, Jan 23 2007 9:22 PM
Very nice, Jose...that works just fine; thank you for the help! Now is there a way to tweak how it looks? Is it defined in particular CSS file?
--Bisnut
  • | Post Points: 20
Top 25 Contributor
Posts 1,879
Points 37,940
CS Developers
Jose Lema replied on Tue, Jan 23 2007 9:29 PM

I don't believe there's a skin file for the weblog calendar control. However, with the div we put in, you should be able to add css targetted to the calendar to your selected themes style.css file.

One is glad to be of service...

Jose Lema

  • | Post Points: 20
Top 150 Contributor
Posts 151
Points 2,495
CFAITH replied on Tue, Jan 23 2007 9:33 PM
Ah...good point. Will try that...thanks so much!
--Bisnut
  • | Post Points: 5
Not Ranked
Posts 34
Points 500
PifGadget replied on Thu, Mar 15 2007 8:36 PM

I would like to add it to my site's Home page to be able to filter my aggregated posts list by date.

I tried to add the lines to my Default.aspx within a CommonSidebarArea like this:

 
<CS:MPContent id="lcr" runat="server">
  <div>
    <div class="CommonSidebarArea">
      <div class="CommonSidebarContent" id="WeblogCalendarSideBar">
        <Blog:WeblogCalendar runat="server" />
      </div>
      ...
    </div>
    ...

  </div>
</CS:MPContent>

Unfortunately it didn't work. Had an Ooops error.

Can that control work on the Home page?

Thanks in advance for your help.

Not Ranked
Posts 7
Points 95
M@rco1981 replied on Thu, Mar 29 2007 7:08 AM
Do the next version CS2007 still support this "Sidebar Calendar"? On CS2007 I haven't found any function... 
  • | Post Points: 5
Not Ranked
Posts 7
Points 95
M@rco1981 replied on Tue, Apr 17 2007 10:47 AM

In CS2007 RTM I have found this "Sidebar Calendar" again... [8-|]

 

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 870
vulupe replied on Wed, May 9 2007 6:48 PM

 

Where exactly did you find this control? How can it be enabled for the CS 2007?
Not Ranked
Posts 7
Points 95
M@rco1981 replied on Thu, May 10 2007 1:47 AM

To add the calendar to the [default] blog theme, open Web\Themes\Blogs\[default]\theme.Master and add the following:

[Line Number: 201 as an example]

<div class="CommonSidebarArea">
        <CSBlog:WeblogCalendar runat="Server" />
</div>

 

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 870
vulupe replied on Thu, May 10 2007 6:30 AM

 

I've done that but unfortunatelly nothig happens. Any ideea why?

Here is my theme.master content:

<%@ Master Language="C#" AutoEventWireup="true" MasterPageFile="~/Themes/default/blogs/blogs.master" %>
<%@ Import Namespace="CommunityServer.Components" %>
<%@ Import Namespace="CommunityServer.Blogs.Components" %>

<asp:Content ContentPlaceHolderID="HeaderRegion" runat="server" >
    <CSBlog:ThemeStyle runat="server" Href="~/style/DynamicStyle.aspx" EnsureNotCachedOnPreview="true" />
</asp:Content>

<asp:Content ContentPlaceHolderID="bcr" runat="server">
    <div class="CommonContentArea">
        <CSBlog:WeblogData runat="server" Property="Name" LinkTo="HomePage" Tag="H1" CssClass="CommonTitle" />
        <CSBlog:WeblogData runat="server" Property="Description">
            <LeaderTemplate><div class="CommonContent"><div class="CommonDescription"></LeaderTemplate>
            <TrailerTemplate></div></div></TrailerTemplate>
        </CSBlog:WeblogData>
        <div class="CommonContent">
            <asp:ContentPlaceHolder runat="server" ID="bcr" />
        </div>
    </div>
</asp:Content>

<asp:Content ContentPlaceHolderID="rcr" runat="server">
    <asp:ContentPlaceHolder ID="rcr" runat="Server">
        <div class="CommonSidebar">
        <div class="CommonSidebarArea">
         <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
         <div class="CommonSidebarInnerArea">
                <h4 class="CommonSidebarHeader"><CSControl:ResourceControl runat="server" resourcename="Weblog_BlogLinks_Header" /></h4>
                <div class="CommonSidebarContent">
                    <ul class="CommonSidebarList">
                  <CSBlog:WeblogData runat="server" ResourceName="Weblog_Link_Home" LinkTo="HomePage" Tag="Li" />
               <CSBlog:WeblogData runat="server" ResourceName="Weblog_Link_Contact" LinkTo="ContactForm" Tag="Li" />
               <CSBlog:WeblogData runat="server" ResourceName="Weblog_Link_AboutAuthor" LinkTo="About" Tag="Li" />
               <CSBlog:WeblogData runat="server" ResourceName="Weblog_Link_ControlPanel" LinkTo="PostControlPanel" Tag="Li" />
              </ul>
          </div>
            </div>
         <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
        </div>
   
        <%--  Renders to blog owners only. Provides links to the CP/etc --%>
        <CSControl:PlaceHolder runat="server">
            <DisplayConditions><CSBlog:WeblogPermissionCondition runat="server" Permission="Post" /></DisplayConditions>
            <ContentTemplate>
                    <div class="CommonSidebarArea" id="QuickLinks">
                     <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                     <div class="CommonSidebarInnerArea">
                            <CSControl:ResourceControl runat="server" ResourceName="Weblog_Quick_Content" Tag="H4" CssClass="CommonSidebarHeader" />
                            <div class="CommonSidebarContent">
                                <ul class="CommonSidebarList">
                                    <CSBlog:WeblogData runat="server" LinkTo="PostEditor" ResourceName="Weblog_Quick_Post" Tag="Li" />
                                    <CSMail:MailingListData runat="server" LinkTo="MailingList" ResourceName="Weblog_Link_PostByEmail" Tag="Li" />
                                    <CSBlog:WeblogData runat="server" LinkTo="PostControlPanel" ResourceName="Weblog_Quick_Manage" Tag="Li" />
                                </ul>
                            </div>
                        </div>
                     <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                    </div>              
            </ContentTemplate>
        </CSControl:PlaceHolder>
       
        <div class="CommonSidebarArea">
         <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
         <div class="CommonSidebarInnerArea">
                <h4 class="CommonSidebarHeader"><CSControl:ResourceControl runat="server" ResourceName="Weblog_Subscriptions" /></h4>
                <div class="CommonSidebarContent">
                    <ul class="CommonSidebarList">
                        <CSBlog:WeblogData runat="server" ResourceName="Weblog_Link_Rss" LinkTo="RSS" Tag="Li" />
               <CSBlog:WeblogData runat="server" ResourceName="Weblog_Link_Atom" LinkTo="Atom" Tag="Li" />
               <CSBlog:WeblogData runat="server" ResourceName="Weblog_Link_Rss_AllComments" LinkTo="RssComments" ContainerId="RssComments" Tag="Li" />
               <CSBlog:WeblogSubscriptionForm runat="server" ID="EmailSubscriptionForm"
                   SubscriptionEmailTextBoxId="SectionSubscriptionTextBox"
                   SubscriptionEmailButtonId="SectionSubscriptionButton"
                   SubscriptionDescriptionId="SectionSubscriptionDescription"
                   SubscriptionPanelId="SubscriptionPanel"
                   Tag="li">
                   <FormTemplate>
                       <CSControl:WrappedLiteral runat="server" ID="SectionSubscriptionDescription" cssclass="BlogSubNotification" />
                      
                       <asp:Panel ID="SubscriptionPanel" runat="server">
                       <CSControl:ResourceControl runat="server" ResourceName="Weblog_Email_Subscription_Header" CssClass="BlogSubscriptionItem" />
                       <CSControlBig SmileefaultButtonTextBox ID="SectionSubscriptionTextBox" runat="server" Text="Your Email Address" ToolTip="Enter your email address"
                           AutoCompleteType="Email" MaxLength="256" Button="SectionSubscriptionButton" CssClass="BlogSubscriptionItem" />
                       <span class="CommonSearchButtonOuter SubscriptionButton"><CSControl:ResourceLinkButton ID="SectionSubscriptionButton" runat="server" CssClass="CommonSearchButton" ValidationGroup="EmailSubscription" /></span>
                       <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" cssclass="validationWarning"
                           validationexpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="Enter valid email"
                           ValidationGroup="EmailSubscription" controltovalidate="SectionSubscriptionTextBox" Display="dynamic" />
                                </asp:Panel>
                   </FormTemplate>
               </CSBlog:WeblogSubscriptionForm>
                    </ul>
                </div>
            </div>
         <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
        </div>

        <%-- 
            Most recent X number of posts. This control can be restyled by
            adding an ItemTemplate/etc
        --%>
        <CSBlog:WeblogPostList runat="Server">
            <QueryOverrides PageIndex="0" PageSize="5" Tags="" />
            <HeaderTemplate>
                <div class="CommonSidebarArea" id="RecentPosts">
                 <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                 <div class="CommonSidebarInnerArea">
                        <h4 class="CommonSidebarHeader"><CSControl:ResourceControl runat="server" resourcename="Weblog_RecentPosts" /></h4>
                        <div class="CommonSidebarContent">
                            <ul class="CommonSidebarList">
            </HeaderTemplate>
            <ItemTemplate>
                <CSBlog:WeblogPostData runat="server" LinkTo="Post" Property="Subject" Tag="Li" />
            </ItemTemplate>
            <FooterTemplate>
                            </ul>
                        </div>
                    </div>
                 <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                </div>
            </FooterTemplate>
        </CSBlog:WeblogPostList>
       
        <%-- This control can not be restyled, but you can control the css and the container elment, css, and id.  --%>
        <CSBlog:TagCloud TagCssClasses="CommonTag6,CommonTag5,CommonTag4,CommonTag3,CommonTag2,CommonTag1" runat="server" IgnoreFilterTags="true" TagCloudCssClass="CommonSidebarTagCloud">
             <LeaderTemplate>
                <div class="CommonSidebarArea">
                 <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                 <div class="CommonSidebarInnerArea">
                        <CSControl:ResourceControl ResourceName="Weblog_CreateEditBlogPost_Categories" runat="server" Tag="H4" CssClass="CommonSidebarHeader" />
                        <div class="CommonSidebarContent">
            </LeaderTemplate>
            <TrailerTemplate>
                        </div>
                    </div>
                 <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                </div>
            </TrailerTemplate>
        </CSBlog:TagCloud>
     
        <%-- Renders the "news" blurb. No restyling except for container control --%>
        <CSBlog:WeblogData runat="Server" Property="News"> 
            <DisplayConditions>
                <CSBlog:WeblogPropertyValueComparison runat="server" Operator="IsSetOrTrue" ComparisonProperty="News" />
            </DisplayConditions>
            <LeaderTemplate>
                <div class="CommonSidebarArea" id="NewsSidebar">
                    <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                    <div class="CommonSidebarInnerArea">
                        <div class="CommonSidebarTopRound"><div class="t1"></div><div class="t2"></div><div class="t3"></div><div class="t4"></div></div>
                        <CSControl:ResourceControl ResourceName="Weblog_News" runat="server" Tag="H4" CssClass="CommonSidebarHeader" />
                        <div class="CommonSidebarContent">
            </LeaderTemplate>
            <TrailerTemplate>
                        </div>
                    </div>
                 <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                </div>
            </TrailerTemplate>
        </CSBlog:WeblogData>               
                       
        <%--
            Can be restyled via templates, but since it uses a parent/child relationship and simply displays links
            I doubt most people will do it.
        --%>
        <CSControl:LinkCategoryList runat="Server">
            <ItemTemplate>
                <div class="CommonSidebarArea">
                 <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                 <div class="CommonSidebarInnerArea">
                        <CSControl:LinkCategoryData runat="server" Property="Name" Tag="H4" CssClass="CommonSidebarHeader" />
                        <div class="CommonSidebarContent">
                            <CSControl:LinkList runat="server" ListCssClass="CommonSidebarList" />
                        </div>
                    </div>
                 <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                </div>
            </ItemTemplate>
        </CSControl:LinkCategoryList>
       
        <%-- Can be restyled with templates --%>
        <CSBlog:ArchiveDataItemList runat="Server">
            <HeaderTemplate>
                <div class="CommonSidebarArea" id="ArchiveSideBar">
                    <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                    <div class="CommonSidebarInnerArea">
                        <CSControl:ResourceControl runat="server" ResourceName="Weblog_Archive" Tag="H4" CssClass="CommonSidebarHeader" />
                        <div class="CommonSidebarContent">
                            <ul class="CommonSidebarList">
            </HeaderTemplate>
            <ItemTemplate>
                <li><CSBlog:ArchiveDataItemData LinkTo="MonthPage" Property="Date" FormatString="MMMM yyyy" runat="server" /> (<CSBlog:ArchiveDataItemData runat="server" Property="Count" /&gtWink</li>
            </ItemTemplate>
            <FooterTemplate>
                            </ul>
                        </div>
                    </div>
                 <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
                </div>
            </FooterTemplate>
        </CSBlog:ArchiveDataItemList> 
        <div class="CommonSidebarArea">
         <CSBlog:WeblogCalendar runat="Server" />
        </div>
        </div>
    </asp:ContentPlaceHolder>
</asp:Content>

  • | Post Points: 20
Not Ranked
Posts 7
Points 95
M@rco1981 replied on Thu, May 10 2007 7:02 AM

I've got the same code... Which version of CS 2007 have you got? Sidebar Calendar only is supported by CS 2007 RTM. (not Betas, I think)

  • | Post Points: 20
Top 500 Contributor
Posts 63
Points 870
vulupe replied on Thu, May 10 2007 7:06 AM

I got it working. I think it was a cache problem and that's why it wasn't showing up. Thanks for helping with this.

I have also modified the code a little, so it fits with the rest of the sidebar:

        <div class="CommonSidebar">
        <div class="CommonSidebarArea">
         <div class="CommonSidebarRoundTop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
         <div class="CommonSidebarInnerArea">
                <h4 class="CommonSidebarHeader">Calendar</h4>
                <div class="CommonSidebarContent">
                     <CSBlog:WeblogCalendar runat="Server" />
  </div>
  </div>
         <div class="CommonSidebarRoundBottom"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
        </div>

  • Filed under:
  • | Post Points: 20
Not Ranked
Posts 7
Points 95
M@rco1981 replied on Thu, May 10 2007 7:21 AM

Ok! Thank you for your code! Smile

  • | Post Points: 5
Page 1 of 1 (14 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com