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 )

9741 put(a) pogledan, 7 odgovor(a) 20.1.2013. 21:08:33Kreirao(la) super
super

super

20.1.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 ?
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
super

super

20.1.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)
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
imarusic

imarusic

21.1.2013. 8: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.
Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava
super

super

21.1.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 ?
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
imarusic

imarusic

22.1.2013. 8: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.
Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava
super

super

22.1.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 ?
Ovaj sadržaj još nije ocijenjen. 
6018 Reputacija 709 Ukupno objava
imarusic

imarusic

23.1.2013. 8: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.
Ovaj sadržaj još nije ocijenjen. 
3016 Reputacija 428 Ukupno objava