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 group discussion boards & Profile privacy  (Mono Support )

Viewed 11771 time(s), 2 post(s) 11/16/2012 9:50:10 AMby Codeplumber
Codeplumber

Codeplumber

11/16/2012 9:50:10 AM
Hello,

I have once more two short questions.

1. How can I set the fields firstname and surename during the registration automatically on non-public? I want to show only the username in top of the profile by default.

2 Is there a way to group the discussion boards? For example: General Forums, Computers & Internet, Business & Finance etc.

Regards
Alex
This content has not been rated yet. 
48 Reputation 3 Total posts
imarusic

imarusic

11/21/2012 10:08:02 AM
Hi,

In order to change the privacy you need to attach to the membership editors events and set the privacy level entry. Take a look at the code sample below:

attach to the membership editor event, you can do it on a membership editor landing page, in code behind:

protected override void OnInit(EventArgs e)
       {           
      
           ctlMembershipEditor.AccountCreated += new ModuleGallery.MembershipModuleEvent(ctlMembershipEditor_AccountCreated);
     
           base.OnInit(e);
       }
 
       void ctlMembershipEditor_AccountCreated(object sender, ModuleGallery.MembershipModuleEventArgs e)
       {
            
           Guid userid = (Guid)e.MembershipUser.ProviderUserKey;
           UserProfileRepository rep = UserProfileRepository.GetInstance();
           rep.UpdatePrivacyLevelDefinitions(userid, typeof(UserProfileEntity).ToString(), UserProfileFields.FirstName.Name, PrivacyLevelEntity.PrivacyLevelPrivate.Id);
           rep.UpdatePrivacyLevelDefinitions(userid, typeof(UserProfileEntity).ToString(), UserProfileFields.LastName.Name, PrivacyLevelEntity.PrivacyLevelPrivate.Id);
 
 
       }
Regarding the discussion boards, you can create boards for each category you want, and then topics in each category.

Please open a new topic if you need more information regarding the discussion boards.

Regards.
This content has not been rated yet. 
3016 Reputation 428 Total posts