CS Nuggets

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

CS2007: My Blogs

People who know a lot about Community Server, know that if you want to navigate to your blog you need to go to Blogs / Blogs on this Site / <your blog>.  The problem is that most people either don't see or don't think about using the Blogs on the Site link.  It is also quite a few things to click on.  In the post "Control Panel" button not showing up for logged in users, people have made the Control Panel available to everyone who is logged in, which really isn't a very good idea.

For CS 2.1, I wrote CS: How to add "My Blogs" to the menu tabs which adds a new tab to the menu bar, but it too can be a little confusing and clutters the menu bar if you have a lot of buttons.  So, for Community Server 2007 I took my modification from CS 2.1 and added a My Blogs link to the Blogs page.  Here is the changes:

Create 'Blog Owners' role:

  1. Navigate your way to Control Panel / Administration / Membership / Manage All Roles and click on Add New Role.
  2. Enter Blog Owners as the name and click Save.
  3. Add the Blog Owners role to each member that is allowed to post to any blog.

If you do not wish to create and/or manage this role, then change all references to Blog Owners in the following code to Registered Users (note the space), and this link will be visible to all registered users, but will only be useful to those who can post to a blog.

File: CommunityServerWeb20 (Internal)/Themes/<theme name>/Blogs/blogs.Master:

In each site theme, inside of the DIV tags that use the CommonSidebarContent class, insert the following lines after both of the <ContentTemplate> open elements:

<CSControl:SiteUrl ResourceName="MyWeblogs" UrlName="blog_ControlPanel_Switch" Tag="Li" runat="server">
    <DisplayConditions><CSControl:UserInRoleCondition UseAccessingUser="true" Role="Blog Owners" runat="server" /></DisplayConditions>
</CSControl:SiteUrl>

This will add the My Blogs link to the sidebar just above the RSS feed link, if the user is a member of the Blog Owners group.

Comments

Qingsong said:

Hi, Bill,

Can I do the samething for Photos as well?

Should I change the code in galleries.Master, or gallerysidebar.ascx?

Thanks,

Qingsong

# June 6, 2007 10:19 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)