Mono Support Feature request: How to see all posts by a user ? I can't see my old posts too here 

Viewed 9979 time(s), 4 post(s), 12/5/2012 1:42:46 PM - by super
12/5/2012 1:42:47 PM
6018 Reputation 709 Total posts

I can't see my old posts here, it would be great if monox team adds this feature (somewhere on profile page) on this website that a user can see all the posts.

Many times a user need to see his/her old posts and on profile page, it only shows last few posts.

How to accomplish this on monox project ? Is there any way ? If no, it would be great to have this feature
If yes, then how ?

1
12/5/2012 7:30:42 PM
15993 Reputation 2214 Total posts

You can use the very same DiscussionMessage module but configured differently so you can page through your posts. Let us know if you need more info. Regards

2
12/5/2012 8:47:12 PM
6018 Reputation 709 Total posts

Yes, please help me with this ?

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) ?

For example: I don't see any section on profile page for posts by user in discussion board: http://monox.mono-software.com/profile-about/admin112/:

Once this is resolved, I would like to know, how to display ALL posts ? and where I can define the number of posts ?

3
12/7/2012 9:09:03 AM
15993 Reputation 2214 Total posts

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) ?
 
For example: I don't see any section on profile page for posts by user in discussion board: http://monox.mono-software.com/profile-about/admin112/:
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

4
This is a demo site for MonoX. Please visit Mono Software for more info.