in

Platinum Bay

Peace, Love and Visual Studio Team System

.NETicated

Hacking Community Server: Comments on the Home Page

Tonight I got a comment on my blog, and noticed that it displayed on the homepage in the "What's New" list. That's weird; certainly not how Community Server used to behave. Anyway I set about to fix it. I found a couple of articles on the subject, but none that I felt were quite right.

The last one I found, while not an ideal solution IMHO, lead me to a much better solution.

Near the top of the Themes/[theme]/Common/home.aspx file, there is a C# code block which performs the search if there is nothing in the cache. It is within this code block that I added the following line of code:

query.UsersToSearch = new int[] { <enter user id(s) here> };

I tried using the UserNamesToSearch property first, but it didn't seem to change the results.  The value passed in is the value in the UserId column for the desired users in the cs_Users database table.

Along with restricting which results display, you can also change how many results are displayed on the home page by changing the PageSize property assignment.

Note: the user restriction works for my site because I am the only user. If you have more than one user on your site, you can either add all the users, or you may need to use one of the other solutions.

Update (7/21/2007):

When I came up with this solution, I somehow overlooked the fact that I myself might post a comment in reply to another comment.  So I am back to implementing the last one I found.

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

About Steve

Steve Andrews has been working as a developer for more than 8 years. During this time, he has designed and developed applications in such widely varying areas as trust accounting, medical information management, supply chain management, and retail systems. He has firsthand developer experience with a variety of languages, including Java, VB, and .NET. Most recently, he has been immersed in SharePoint. He is currently employed at RDA Corporation in Philadelphia, PA, as a Software Engineer and a team member in the Architectural Guidance evangelism team. Steve is also an MTCS (x2), ICSOO, and .NET fanatic.
Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.