View another user's forum posts

rated by 0 users
This post has 5 Replies | 3 Followers

Top 500 Contributor
Posts 68
Points 1,005
jsawruk Posted: Tue, Aug 12 2008 9:25 AM

Is it possible to view Forum posts that another user has participated in; for instance, on THEIR profile page. (View forum posts that the user whose profile you are viewing has participated in).

I currently have a CSForum:ThreadList control, but there does not seem to be a way to have it get data for an arbitrary user id; it always gets data for the currently logged in user. I have tried to explicitly set the UserID property of the QueryOverrides both in the markup and programmatically, but always get the same results.

I have even tried building a List<Thread> object directly and making it the ThreadList's datasource, but this leads to other problems.

I therefore conclude that the functionality that I am trying to implement is not currently possible in CS 2008 OR is a bug. Am I missing something? Any ideas on a workaround?

  • Filed under:
  • | Post Points: 35
Top 10 Contributor
Posts 3,669
Points 55,515
TelligentSupportTeam

Firstly, if you want a list of posts the user has participitated in, you'll wnat to use a ForumPostList control, not a ThreadList control.

Community Server Documentation please rate articles you read

Nintendo Wiikly | My Blog

  • | Post Points: 5
Top 75 Contributor
Posts 304
Points 4,535
jeffesp replied on Tue, Aug 12 2008 9:40 AM

If you don't need all the details that a CSForum:ThreadList provides, then you could try a CSControl:IndexPostList specifying the QueryType to be "ByCurrentUser".  The CSControl:IndexPostData isn't quite as complete, but if you just want basic info, then it should do the trick.

--
--Jeff (ATGi)
  • | Post Points: 20
Top 500 Contributor
Posts 68
Points 1,005
jsawruk replied on Tue, Aug 12 2008 10:03 AM

I tried the ForumPostList control, but it didn't display anything (I am not in a Forum context).

Could you please provide markup for the IndexPostList control?

 

  • | Post Points: 20
Top 75 Contributor
Posts 304
Points 4,535
jeffesp replied on Tue, Aug 12 2008 10:23 AM

Something like this should be a good start:

                                <CSControl:IndexPostList runat="server">
                                    <QueryOverrides QueryType="ByCurrentUser" ApplicationTypes="Forum" />
                                    <ItemTemplate>
                                        <CSControl:IndexPostData runat="server" Property="Title" LinkTo="Post" />
                                    </ItemTemplate>
                                </CSControl:IndexPostList>

--
--Jeff (ATGi)
  • | Post Points: 20
Top 500 Contributor
Posts 68
Points 1,005
jsawruk replied on Tue, Aug 12 2008 12:12 PM

That does exactly what I wanted. Thanks.

  • | Post Points: 5
Page 1 of 1 (6 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com