Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Message Board (Display of Edit and Delete options) View modes: 
User avatar
Member
Member
Scorpion - 11/30/2010 2:07:16 PM
   
Message Board (Display of Edit and Delete options)
Hi!

I am using the message board web part in one of pages for posting message in my profile as well as my friends profile.
I have enabled the edit and delete options for the web part.
I can see this options only in my message board, but not in my friends message board.
My question is, Is their any chance that I can view these (Edit/Delete) options for the messages posted by me in my friends or others profile. So that, I can later edit or delete the messages I posted on others profile.

Can any one please let me know the solution.

Thank You,

Scorpion



User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 12/2/2010 11:54:49 AM
   
RE:Message Board (Display of Edit and Delete options)
Hi,

currently, the design allows Edit/Delete actions only to owner of the message board, and also those who are authorized to manage messages (Modify permission for Message boards module). However, that permission allow to modify all messages, which is probably not wanted.

To override the default behavior, you could modify the Message board webpart, which renders the messages and decides to show the Edit/Delete controls.
It can be found in ~\CMSModules\MessageBoards\Controls\MessageBoard.ascx.cs, particular code is:


// Handle buttons displaying
boardMsgActions.ShowApprove = ((this.BoardProperties.ShowApproveButton) && (!bmi.MessageApproved) && userVerified);
boardMsgActions.ShowReject = ((this.BoardProperties.ShowRejectButton) && (bmi.MessageApproved) && userVerified);
boardMsgActions.ShowDelete = ((this.BoardProperties.ShowDeleteButton) && userVerified);
boardMsgActions.ShowEdit = ((this.BoardProperties.ShowEditButton) && userVerified);


You could add a condition to check also if the current User is a friend of the Message board owner. Would this be a solution for you?

Should you need any additional details, feel free to ask.

Regards,
Zdenek C.

User avatar
Member
Member
Scorpion - 12/2/2010 3:35:53 PM
   
RE:Message Board (Display of Edit and Delete options)
Hi!

Thank You Zdenek for the reply.
Yes, this solution is helpful.

Thank You