A quick guide to extending the default profile fields using nForum:
Installation:
1. Install nForum as per standard instructions. 2. In the Umbraco admin go to members > member types and click on Forum user. 3. Click on the generic properties tab, then add a new property. I'm adding a property to check if the user wants to signup to a newsletter, in this we are calling it "forumUserNewsletter" of type true/false.
4. Download and unzip the solution into a new folder, you will need Visualstudio 2010 to edit. 5. Open the solution. 6. Right click on the nForum project > Choose properties > Build Events. 7. Now edit the post-build command-line (click the Edit button) 8. Change the XCOPY statements to copy into your umbraco installation folder (change the right hand-side paths to the correct ones)
Now we're ready to edit the sourcecode, if you look there is already an example of what you need to do, "forumUserTwitterUrl" is an extension of the profile, so you just need to add your own property where this one appears throughout the code.
9. Edit Register form - go to nForum > usercontrols > nForum > membership > Register.ascx
<dt><label for="<%= cbNewsletter.ClientID %>">Register for Newsletter?</label></dt> <dd><asp:CheckBox ID="cbNewsletter" runat="server" /></dd>
11. Then in the code-behind edit the BtnSubmitClick (important,the getproperty value should be the same as property set in step 3).
Adding fields to the membership profile.
Hi,
A quick guide to extending the default profile fields using nForum:
Installation:
1. Install nForum as per standard instructions.
2. In the Umbraco admin go to members > member types and click on Forum user.
3. Click on the generic properties tab, then add a new property. I'm adding a property to check if the user wants to signup to a newsletter, in this we are calling it "forumUserNewsletter" of type true/false.
Sourcecode:
Now go to nforum on codeplex : http://nforum.codeplex.com/ and download the sourcecode.
4. Download and unzip the solution into a new folder, you will need Visualstudio 2010 to edit.
5. Open the solution.
6. Right click on the nForum project > Choose properties > Build Events.
7. Now edit the post-build command-line (click the Edit button)
8. Change the XCOPY statements to copy into your umbraco installation folder (change the right hand-side paths to the correct ones)
Now we're ready to edit the sourcecode, if you look there is already an example of what you need to do, "forumUserTwitterUrl" is an extension of the profile, so you just need to add your own property where this one appears throughout the code.
9. Edit Register form - go to nForum > usercontrols > nForum > membership > Register.ascx
11. Then in the code-behind edit the BtnSubmitClick (important,the getproperty value should be the same as property set in step 3).
12. Edit ForumMemberProfileEdit.ascx add
then in the code behind add to the loadProfile method:
and to the btnSubmitClick method:
13. Edit the help class for NfMember - Go to nforum.BusinessLogic > Membershiphelper.cs adding:
and the following
to the NfMember method.
14. Build the solution and the files will be automatically copied into your umbraco solution (if you have set XCOPY correctly).
15. Repeat this for each additional profile property you wish to add.
Matt
Slight typo.. Step 12 should be: (add to the loadprofile method)
if (CurrentMember.MemberIsNewsletter)
cbNewsletter.Checked = true;
Nice write up :)
is working on a reply...