Hi,
please visit
http://nightly.mono-software.com, use SusanG/12345!"#$% credentials and check the profile, there should be a list of user posts - "Forum Posts " module
I logged in as admin and created test topics in monox and wrote a few posts but I don't see any post on profile page of the user (admin - me) ?
To use this in your app please use the code below:
<
MonoX:DiscussionMessages
ID
=
"discussionTopicMessages"
runat
=
"server"
HideIfEmpty
=
"true"
ShowActionButtons
=
"false"
ShowMessagePost
=
"false"
CurrentMode
=
"None"
IsPublic
=
"true"
EnablePrettyPhoto
=
"true"
MaxPostLength
=
"40"
Template
=
"UserProfileDiscussionMessage"
EnableSyntaxHighlighter
=
"false"
ShowHeader
=
"false"
ShowPager
=
"true"
PageSize
=
"10"
></
MonoX:DiscussionMessages
>
/// <summary>
/// Gets or sets the current user.
/// </summary>
protected
UserProfileEntity CurrentUser {
get
;
set
; }
private
Guid? _userId =
null
;
/// <summary>
/// Gets or sets the user id.
/// </summary>
public
Guid UserId
{
get
{
if
(!_userId.HasValue)
{
string
userName = String.Empty;
if
(UrlParams.UserProfile.UserName.HasValue)
{
userName = MonoSoftware.Web.UrlEncoder.UrlDecode(UrlParams.UserProfile.UserName.Value);
if
(!String.IsNullOrWhiteSpace(userName))
_userId = SecurityUtility.GetUserId(userName);
}
if
(!_userId.HasValue)
_userId = SecurityUtility.GetUserId();
}
return
_userId.GetValueOrDefault();
}
set
{
_userId = value;
}
}
protected
override
void
OnInit(EventArgs e)
{
CurrentUser = UserProfileBLL.GetInstance().GetCachedUserProfile(UserId);
if
(CurrentUser ==
null
)
{
Message.Show(MonoSoftware.MonoX.Resources.PageResources.UserProfile_NoSuchUser);
}
base
.OnInit(e);
}
protected
override
void
OnInit(EventArgs e)
{
base
.OnInit(e);
...
discussionTopicMessages.Title = PageResources.UserProfile_DiscussionMessages_Title;
...
discussionTopicMessages.Visible =
false
;
if
(!String.IsNullOrEmpty(UserName) && !Guid.Empty.Equals(UserId))
{
if
(CurrentUser !=
null
)
{
...
discussionTopicMessages.UserId = CurrentUser.Id;
discussionTopicMessages.Visible =
true
;
discussionTopicMessages.BindData();
...
}
}
else
{
this
.SetPageTitle(MonoSoftware.MonoX.Resources.PageResources.UserProfile_NoSuchUser);
}
}
Regards