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

9826 put(a) pogledan, 4 odgovor(a), 5.12.2012. 13:42:46 - Kreirao(la) super
5.12.2012. 13:42:47
6018 Reputacija 709 Ukupno objava

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
5.12.2012. 19:30:42
15993 Reputacija 2214 Ukupno objava

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
5.12.2012. 20:47:12
6018 Reputacija 709 Ukupno objava

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
7.12.2012. 9:09:03
15993 Reputacija 2214 Ukupno objava

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
Ovo je MonoX demo site. Posjetite Mono Software za više detalja.