Mono Support how to hide/disable photos tab in user's profile ? 

Viewed 9645 time(s), 7 post(s), 1/20/2013 9:08:33 PM - by super
1/20/2013 9:08:33 PM
6018 Reputation 709 Total posts

Currently I don't want the feature of photos so I want to remove the tab from user's profile about Photos.

I tried removing this from MyWall.aspx : <MonoX:MyPhotos ID="myPhotos" runat="server" PageSize="6" GroupItemCount="2" EnablePaging="false"></MonoX:MyPhotos>

and this: <%@ Register TagPrefix="MonoX" TagName="MyPhotos" Src="/MonoX/ModuleGallery/SocialNetworking/PhotoGallery/MyPhotos.ascx" %>

Removing both gives me error that the page cannot find photos...

Plz help me in removing this so that any user don't see anything related to uploading photos in their account ?

1
1/20/2013 9:19:08 PM
6018 Reputation 709 Total posts

This is the error I get:

Object reference not set to an instance of an object.
at MonoSoftware.MonoX.Pages.Profile.MyWall.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

2
1/21/2013 8:39:19 AM
3016 Reputation 428 Total posts

Hi,

you can not directly delete control/part from the markup because in most cases there is some code in code behind which references that control. 

You can simply set Visibility to false for the MyPhotos control.

Regards.

3
1/21/2013 4:56:35 PM
6018 Reputation 709 Total posts

I tried this:

<MonoX:MyPhotos ID="myPhotos" runat="server" PageSize="6" GroupItemCount="2" EnablePaging="false" Visible="false" ></MonoX:MyPhotos>

But still it is available in user's profile ? I even tried resetting/personlized the my wall page in administration but still it is there ?

4
1/22/2013 8:54:26 AM
3016 Reputation 428 Total posts

Ok,

you can hide it on pages code behind , on the prerender method, you need to extend the Wall.aspx page and add your own code behind.

Other option is to do it via web part properties, please take a look at the attached image.

5
1/22/2013 6:14:45 PM
6018 Reputation 709 Total posts

My question is, hiding this photo web part will hide the area where a user uploads images, but 4th tab that says "Photos" will still be visible ? how to hide that tab ?

6
1/23/2013 8:26:08 AM
3016 Reputation 428 Total posts

Hi,

you need to navigate to "UserProfileHeader.ascx" control and hide that link:

<asp:PlaceHolder ID="plhPhotos" runat="server" Visible="false">
<li <%= GetSelectedCssClass(AppendUserNameQueryParam(Paths.MonoX.Pages.UserProfile.MyPhotos_aspx)) %>>
    <a href='<%= MonoSoftware.MonoX.Utilities.LocalizationUtility.RewriteLink(GetProfilePhotosUrl(UserName)) %>'>
    <%= MonoSoftware.MonoX.Resources.UserProfileResources.UserProfileHeader_Photos%></a>
</li>
</asp:PlaceHolder>
Regards.

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