Mono Support Declared Web Parts not showing on User Profile page (Closed)

Viewed 14555 time(s), 4 post(s), 11/29/2011 4:32:07 PM - by grant.stone007
11/29/2011 4:32:07 PM
647 Reputation 69 Total posts

My current MonoX portal version is 4.5.3200.40. In /MonoX/Pages/SocialNetworking/UserProfile.aspx there are several web parts declared (see below). PeopleSearch, and the two InvitationList parts do not show on the page. I have confirmed this using a user who has both Sent and Received invitations but the parts do not show. I have even experimented with changing the HideIfEmpty parameter to false but the parts do not appear.

Please advise on what may be prohibiting these parts from showing.

<td class="right-section">
<portal:PortalWebPartZoneTableless HeaderText='<%$ Code: PageResources.Zone_RightPartZone %>' ID="rightWebPartZone" runat="server" Width="100%" ChromeTemplateFile="RightColumn.htm" ShowChromeForNonAdmins="true">
<ZoneTemplate>
<MonoX:PeopleSearch runat="server" ID="snPeopleSearch" ConfirmationRequired="true" />
<MonoX:InvitationList runat="server" InvitationType="InvitationsSent" ID="ctlInvitationsSent" PageSize="9" AvatarSize="40" HideIfEmpty="true" />
<MonoX:InvitationList runat="server" InvitationType="InvitationsReceived" ID="ctlInvitationsReceived" PageSize="9" AvatarSize="40" HideIfEmpty="true" />

<MonoX:FriendList runat="server" PageSize="9" AvatarSize="40" ID="snFriendList">
</MonoX:FriendList>
<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="false" PageSize="10"></MonoX:DiscussionMessages>
</ZoneTemplate>
</portal:PortalWebPartZoneTableless>
</td>


1
11/29/2011 6:04:48 PM
15993 Reputation 2214 Total posts

Hi,

these three WebParts are implemented for a demo purposes so you will need to do some changes to show the invitation lists, and PeopleSearch should be only visible when you are looking at some else's profile and he isn't your friend, if he is your friend then you will see only the label informing you that you are already friend with the user.

To show the invitation lists you will need to override the OnLoad page event and the following code:

if (CurrentUser != null)
{
    ctlInvitationsSent.Visible = CurrentUser.Id.Equals(SecurityUtility.GetUserId());
    ctlInvitationsReceived.Visible = CurrentUser.Id.Equals(SecurityUtility.GetUserId());
}


Regards

2
11/29/2011 7:29:14 PM
647 Reputation 69 Total posts

I understand. Thank you for the explanation and example code.

3
11/29/2011 8:45:00 PM
15993 Reputation 2214 Total posts

I'm closing this issue as you have marked it as solved.

Regards

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