Dave Burke : Online Community and Social Business Specialist

CS Nuglet: Threading the Most Recent Admin Forum Post Link Needle

What the heck is THIS nuglet about?  Well, we're going to create a link in the forums discussion list to the most recent post made by a designated administrative user or role.  Here's a great example from the World of Warcraft forum.  It's a non-CS forum, but gives you an idea of what the link would look like.  The Blizz link displays the most current authoritative post in the discussion.

 

 

I was asked today what would be involved to add this link to /forums/ShowForum.aspx in Community Server and whether the most recent administrator post information was readily available.  The answer was no, this information is not readily available, but it does make for an interesting study in the Community Server Query, Thread and ThreadSet objects that generate a Forum Discussion list.  This CS Nuglet then is a guide on adding a Most Recent Admin Forum Post link, looking at the process and objects along the way.

We begin in the CS.Discussions.Controls.ThreadView class and View-Threads.ascx.  Here we populate our query based on the many filters and view options supported in Community Server Forums.  The posts for the forum we retrieve are a ThreadSet object and retrieved from CS.Discussions.Components.Threads GetThreads(ForumThreadQuery query), where ForumThreadQuery inherits from the shared CS.Components.ThreadQuery object. 

Here in the Discussions.Threads component our very cool CacheKey is created based on the current query object.  The CacheKey stores our previously viewed ThreadSet for quick retrieval from the cache when we return to the list.  Here's a before and after of creating that cacheKey with a screenshot (enlarge to view.)

 

 

Key goes in as

Forum-Threads::S:{0}-PS:{1}-PI:{2}-Day:{3}-Year{4}-SB:{5}-SO{6}-AT:{7}-U:{8}-R:{9}-U:{10}-L:{11}-OT:{12}-T:{13}-C:{14}-ISP:{15}

and comes out as

Forum-Threads::S:6-PS:0-PI:20-Day:1-Year1-SB:LastPost-SODescending-AT:False-U:False-R:Everyone,Registered Users-U:-L:-OT:False-T:-C:False-ISP:False

If our ThreadSet is not available in cache we pass our query object along to the ForumSqlDataProvider to retrieve a ThreadSet from GetThreads(ForumThreadQuery query) with the cs_Threads_GetThreadSet stored procedure.  Our new ThreadSet will be complete when an ArrayList of Threads is added by a DataReader in the same GetThreads() method. 

 

 

The CS.Discussion.Thread object contains everything a growing Discussion list needs to grow up healthy and strong, but it doesn't contain a MostRecentAdminPostID integer property.  This is all that would be needed to generate a Most Recent Admin Forum Post url given Community Server's beefy Url Provider services.  We do have a MostRecentPostID property, even a MostRecentPostAuthor string and MostRecentPostAuthorID int, but to add a link to the Most Recent Administrative Post, we'd need a MostRecentAdminPostID as well.

To finish up, given what we now know about threadsets, threads and the process of generating a discussions list, what would be needed to add a link to the most recent administrator or designated role post in a discussion thread?  Not much.  We would need to


1) add logic to the cs_Threads_GetThreadSet SQL stored procedure to return a postID of the most recent post based on our administrator/role criteria

2) add a MostRecentAdminPostID integer property to the Discussions Thread component object,

3) populate the MostRecentAdminPostID property from the Forums Data Provider PopulateThreadFromIDataReader() method, and

4) create and generate the hyperlink in the ThreadView.cs class and View-Threads.ascx controls

Comments (4) | Post RSS RSS comment feed

Posted on 12/13/2006 8:09:06 PM by Dave Burke
Categories: Community Server
Tags:

Related posts

Comments (4) -

12/13/2006 10:56:45 PM Permalink

Being an avid WoW player, I'm familiar with the Blizzard forums. Smile

You're a little off in how it works.  First, the icon indicates that an official Blizzard rep has responded within the thread.  Clicking on the icon takes you to the first post (earliest) within that thread from a Blizzard rep.  Once you're at that post, if there are subsequent posts from a Blizzard rep, you'll see an icon (see the url below) which when clicked will take you directly to the next post.  

So for example, you could have a 40 page thread (over 700 posts) and quickly jump through the thread to see what the official posts have been.  This is an awesome feature as it saves one from having to sift through all the extraneous posts (arguments, whines, debates, flames, etc.) and lets you get right to the good stuff.  It's a very nice system and a great timesaver when you're trying to quickly sift through a lot of information.

forums.worldofwarcraft.com/.../blizz-post.gif

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Another popular MMORPG, Everquest 2, uses Lithium for their boards.  
http://eqiiforums.station.sony.com/

For players to keep track of developer posts, they added links at the top of the page (labeled "trackers") for the official SOE roles.  Clicking on the link brings up a list of all recent posts by members of that role (sorted newest to oldest) with a listing for each post.

David Voss |

12/14/2006 5:34:41 AM Permalink

David, the "last admin post" description came out of a Gold Forums request for a feature as I described it.  While my "last admin post" description was what he wanted based on that conversation, I definitely got the functionality wrong according to your examples.  Serves me right for not being a World of Warcraft fan.

I wrote this as a study in the Forums Query, Thread and Threadset creation process, but thanks for setting me straight on the WoW admin links.  I see how that would be superior to a simple most recent admin post function.  

Thanks, man.

daveburke |

12/15/2006 7:10:14 AM Permalink

This is a highly desired feature of CS.

Suggestion: Add an extra imagage to "Groups". The normal curently existing group image (Like the MVP logo over at CS), and a smaller one to be used in the Thread listings as in WoW. It's a highly desired feature to be able to quickly scan post from a specific Clan/group.

CSwildcard |

12/15/2006 7:21:44 AM Permalink

Nice, CSWildcard.  Wow, a version 2.0 add-on function.  Interesting.  Thanks for the idea.

daveburke |


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke

Copyright © 2013 Dave Burke.  All Rights reserved.