in

Platinum Bay

Peace, Love, and...

This Blog

Syndication


.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 is an independent consultant, INETA speaker, and Microsoft MVP for Visual Studio ALM. He has been working in technology for over ten years focusing on custom application development and Application Lifecycle Management. Steve is also Microsoft and IBM certified and a community fanatic having led sessions at nearly 100 events across North America. When he's not developing software solutions or engaging with the community about software technology, Steve is a closet singer and songwriter and plays the guitar and keys. Occasionally, Steve even gets to sleep. Occasionally.
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.