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.

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

Viewed 8520 time(s), 4 post(s) 12/5/2012 1:42:46 PMby super
super

super

12/5/2012 1:42:47 PM
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 ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

12/5/2012 7:30:42 PM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts
super

super

12/5/2012 8:47:12 PM
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 ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

12/7/2012 9:09:03 AM
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
This content has not been rated yet. 
15993 Reputation 2214 Total posts