MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

MessageList  (Mono Support )

Viewed 14156 time(s), 2 post(s) 2/3/2011 2:42:05 AMby dimonandrey
dimonandrey

dimonandrey

2/3/2011 2:42:05 AM
Working with MessageList question arose how to display user avatars next to each record in messagelist?
This content has not been rated yet. 
1 Reputation 1 Total posts
denis

denis

2/15/2011 11:57:57 AM
Message parts are not templated (as they are rather complex), so the customization process is more involved. I would do it this way:
1. create a new MessageList.ascx in your project with the accompanying codebehind file and inherit from the MonoSoftware.MonoX.ModuleGallery.SocialNetworking.MessageList
2. do the same for the MessageCenter.ascx and change the line that references the original MessageList to point to your new MessageList control
3. create a new GridTemplateColum in the grid that is used to display messages that will contain a Gravatar control

declaration in the ascx header
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX.Blog" TagPrefix="monox" %>
...
in the templated column
<MonoX:Gravatar ID="ctlGravatar" runat="server" UserName='<%# Eval("AspnetUser.UserName") %>' />


That should be it - place your custom MessageCenter part on the page and it should contain a MessageList with the user avatar.
This content has not been rated yet. 
7207 Reputation 956 Total posts