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 10045 time(s), 7 post(s) 20.01.2013 21:08:33by super
super

super

20.01.2013 21:08:33
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 ?
Dieser Inhalt wurde noch nicht bewertet. 
6018 Reputation 709 Total posts
super

super

20.01.2013 21:19:08
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)
Dieser Inhalt wurde noch nicht bewertet. 
6018 Reputation 709 Total posts
imarusic

imarusic

21.01.2013 08:39:19
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.
Dieser Inhalt wurde noch nicht bewertet. 
3016 Reputation 428 Total posts
super

super

21.01.2013 16:56:35
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 ?
Dieser Inhalt wurde noch nicht bewertet. 
6018 Reputation 709 Total posts
imarusic

imarusic

22.01.2013 08:54:26
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.
Dieser Inhalt wurde noch nicht bewertet. 
3016 Reputation 428 Total posts
super

super

22.01.2013 18:14:45
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 ?
Dieser Inhalt wurde noch nicht bewertet. 
6018 Reputation 709 Total posts
imarusic

imarusic

23.01.2013 08:26:08
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.
Dieser Inhalt wurde noch nicht bewertet. 
3016 Reputation 428 Total posts