Display total count of forum posts made by user

Display total count of forum posts made by user

This question is answered

Hi,

I need to display total count of forum posts made by user. Can anybody please suggest how this can be implemented?

Thanks.

Verified Answer
  • That is certainly unfortunate.  In that case you are probably going to be better off creating your own SQL to query this information and then a nvelocity extension to call your new sproc.  

All Replies
  • In your widget you can call the threads velocity extension and execute the List method with the options UserId = <accessing userId>, PageSize = 1.  Then from the result you can get the total count from TotalCount.

  • Hi,

    Thanks for the Response.

    As per Velocity extension documentation $core_v2_forumThread.List() does not have UserId parameter.

    http://telligent.com/community/developers/w/developer6/22000.core-v2-forumthread-widget-extension.aspx

    To explain further about the functionality I need to implement that is, In the forum posts list widget, I need to display count of  total posts made by user in all forums created under systems root group (I.e. $core_v2_group.Root) including threads create by him as well as replies made by him to any thread. Below is the screen shot to get an idea about the requirement:



    I tried to add UserId parameter as you suggested in the threads velocity extension for each user in the forum posts list as:

    $core_v2_forumThread.List("%{GroupId = $core_v2_group.Root.Id, PageSize=1, UserId = $post.Author.Id}"))

    But, it always returns constant value (i.e. 66 ) as TotalCount and ignoring UserId parameter value.

    Please suggest.


    Best Regards.


  • That is certainly unfortunate.  In that case you are probably going to be better off creating your own SQL to query this information and then a nvelocity extension to call your new sproc.