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.

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

Viewed 8716 time(s), 7 post(s) 1/20/2013 9:08:33 PMby super
super

super

1/20/2013 9:08:33 PM
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 ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
super

super

1/20/2013 9:19:08 PM
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)
This content has not been rated yet. 
6018 Reputation 709 Total posts
imarusic

imarusic

1/21/2013 8:39:19 AM
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.
This content has not been rated yet. 
3016 Reputation 428 Total posts
super

super

1/21/2013 4:56:35 PM
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 ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
imarusic

imarusic

1/22/2013 8:54:26 AM
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.
This content has not been rated yet. 
3016 Reputation 428 Total posts
super

super

1/22/2013 6:14:45 PM
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 ?
This content has not been rated yet. 
6018 Reputation 709 Total posts
imarusic

imarusic

1/23/2013 8:26:08 AM
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.
This content has not been rated yet. 
3016 Reputation 428 Total posts