2

I have a discussion board in SharePoint 2010 which is customized and showing in threaded view.

I want to show the name of the person who has given reply to the posts in the progress status bar.

There is a content approval process also, to approve all the replies before it seen to the public. When ever the reply is approved, the Posted By is changed to the approver's name instead of the Replied username.

Please let me know any solution for this. I have been trying it for the past two weeks.

1 Answer 1

1

Seems this is a bit tricky as SharePoint uses the modified by field for the poster.

There's two ways I could see this working. I don't know XSL well enough to advise you on creating an XSL template and injecting it into the web part, but seeing as this is an xslt web part you presumably could do this and return whatever value you want in any area. You may be able to get hold of the threaded template as a starting point.

Alternatively, you could use javascript/jquery and the client object model to achieve the result. The solution would go something like this:

-script on the page will run when the page is fully loaded (since this is client-side). -The script will look through each post and extract the "ID" of each item, as each post is an item. -The script will then query your discussion list to find the name of the person who created that item. -The script will then query the user profile service and populate the image of that user on the left hand side.

I hope that made sense. Happy to clarify if that was a bit convoluted.

EDIT

Have you looked at this forum thread?

http://social.msdn.microsoft.com/Forums/en-US/79d9d527-968d-4b96-9ee2-352d539f4604/sharepoint-2010-customize-loook-of-a-discussion-thread

It shows you where the original thread.xsl is stored on your SP server and you can create a new one and reference it in the XSLLink property of your web part. In your new xsl file you can return whatever value you want for the username on the left hand side. I have not tried this myself but the word is this seems to work.

Tal

I don't need more customizations. Even we use the default thread view with content approval, the posted By will change to the approver's name. So briefly i need an approval process and also to display the replied users name for a discussion thread.

3
  • Hi Aathi, it seems you posted one of your comments as an edit to my post :-)
    – user23429
    Commented Feb 5, 2014 at 14:03
  • Short answer is, you can't do this without some level of customisation. The threaded view shows the last modified user name and the approval workflow counts as modifying the item. I don't think Microsoft anticipated discussions and approval being used together otherwise they would have displayed the created username, which would really make more sense. Some level of customisation seems like your only option here, or ditch the approval workflow and use alerts instead for moderation (ie. moderator is alerted when anything is posted and can remove it if needed). Maybe that is a good compromise?
    – user23429
    Commented Feb 5, 2014 at 14:06
  • Yes...i understood the complexity..
    – Aathi
    Commented Feb 10, 2014 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.