CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

An AggregateCompactBlogList Control for CommunityServer

Earlier this week, Dave Burke left a comment to my We've Been Community Serverized! post.

I'm thinking it would be nice to have a list of CodeBetter.com bloggers on your aggregated page when time permits. Have all of you .NET studs listed on one page.

This, unfortunately, is not an out of the box control for Community Server, so I went source code spelunking to figure out how to do it.  I’ll have to say, I’m digging the way they built the CS application. Is very well thought out.  The code separation is great.  Ease of skinning and modification was definitely a high priority for them, and it shows.  It’s not all rosy under the covers but for version 1, it’s one of the best open source code apps I’ve seen.

Without further ado, here’s how I created the “Sorted Blogger List”

Step 1. Download the Source Code

Get my source mods here.

Step 2. Add CollectionView.cs to your Project

You’ll need an easy way to sort the business entity collections to enable sorting of the blogger list (by post count, for automatic blogger ego stroking ;) ). You can add the code from my Sort/Filter Your Business Entity Collections with a NEW CollectionView to your project somewhere. I added it to my “CS\src\Components\Provider\” directory, not sure if this was the right place or not, but it works.

Step 3. Add AggregateCompactBlogList.cs Control

Add this source file to your “CS\src\Blogs\Controls\AggregateBlogControls” directory

Step 4. Add the Skin-AggregateCompactBlogList.ascx Control

Add this source file to your “CS\src\Web\Themes\default\Skins\Blogs” directory

Step 5. Add the Control to Your default.aspx page

The final step is to add the control somewhere, like so: 

<blog:aggregatecompactbloglist id="AggCompactBlogList" runat="Server"/>

That’s it. You should now have a list of all bloggers, grouped by blog category, just like good ol’ .TEXT used to have.

-Brendan



Comments

daveburke said:

I meant that about you ".NET studs," you know. You had the list online in what seemed like only a few hours.

By the speed of your whipping out that control and your description here, its clear that you are really a quick assimilator of the CS logic. Very impressive. I don't need such a control, but I'm going to download it and walk though the install just to follow your thinking.
# March 25, 2005 4:36 PM

Brendan Tompkins said:

:) Thanks Dave. Yes, it's true about us all being hunks. We're dumb, but good looking :)

Once I "got it" I feel pretty confident about making mods to CS. It really was only a few lines of code, just have to know where to put it. That's the sign of a good object model to me.. :)
# March 25, 2005 5:09 PM

daveburke said:

I'll try to analyze the CS architectural from a more "hunky" perspective. Perhaps that good object model will reveal itself to me, too?

Little things about CS keep pissing me off though. Like why is it as I'm entering this comment that I can't see any other comment? Only the main post? And why do I have to enter my URL if I took the trouble to register? And another thing....

Anyhoo, thanks for your posting on CS. I'll be staying tuned.
# March 25, 2005 7:00 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Brendan Tompkins

Brendan has been programming with .NET since the first public beta and is owner and operator of Port Technology Services, a consultancy company providing .NET application development services to the Maritime industry. In July, 2007, he was awarded the Microsoft MVP award for ASP.NET. He's also a proud co-founder of failed .COM startup Intrinsigo, and has had a hand in the failure of numerous other businesses. He currently runs CodeBetter.Com and Devlicio.us, and lives in Norfolk, Virgina with his wife Tiara and son Ian.

View Brendan's profile on LinkedIn

Check out Devlicio.us!

Our Sponsors

Free Tech Publications