You need to Register for free and Login to post a message in the forum.

Forum

Subject: How to customize the DNN's Register Module
Prev Next
You are not authorized to post a reply.

Page 1 of 212 > >>
Author Messages
sandip
Nuke Active Member
Nuke Active Member
Posts:29

18 Jan 2006 8:23 AM  

Dear Lee,

 

Hope you are doing fine. We want to modify the DNN’s register module. With DNN’s basic fields, we want to add few customized fields. Can you please tell me how should we do this.

 

We have open the DNN source code and now trying to change design of register page from Register.ascx. And also thinking to change the code from Register.ascx.vb. Is it right approach?

 

An immediate reply would be appreciated.

 

Thanking you,

 

Sandi

leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

18 Jan 2006 2:28 PM  
Hello Sandi,

I'm good thanks. I've recently discovered this module which allows you to create customised registration forms for your users - it should cover exactly what you need:

http://dnn310.ucanuse.com/PortalModules/UserAttributes25/tabid/57/Default.aspx

I've heard mixed views on the module, so I would encourage you to test it thoroughly first before using it in a production environment.

I haven't used this module yet so i can't provide any advice, but it looks perfect for the job.

Hope this helps,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
sandip
Nuke Active Member
Nuke Active Member
Posts:29

19 Jan 2006 10:37 AM  

Dear Lee,

Thank you for prompt reply. I already have gone this link before. And basically we cannot afford to buy anything, but want to develop that module. So please suggest where we can get help regarding how to develop/customize Register module.

We have now found that there are two controls ( user/addresses ), which DNN is using into register module. So we are thinking to change these controls.....

Or add our new control (we have created new control but not know how to use it into existing register module..)... Please let us know which option could be better for this..

Please reply as soon as possible.

Thanking you,

Sandip

leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

19 Jan 2006 11:02 AM  
Ok, If you are going to develop your own module then think carefully how you are going to do it.

For instance, I would not alter any of the core tables or procedures for DNN. - The reason for this is because it will cause you a massive headache if you want to upgrade your installation in the future.

If I was programming this I would create a completely separate module which would link to the user account by the User ID - so in your own user table you will have a User ID number which will link to the User ID number in the DNN users table.

From here you can build your module and forms to collect any data that you require.

(This is all theory, I haven't put it into practice)

Within DNN once you have created your separate module you can place the user account module and your module on the same page to collect the data you require. (see this post for how to configure DNN for this)

Or a better method would be to take elements of the account module that you require and create a module that inserts data into the user table and then into your own user table.

To do this you would have to insert data into the DNN user table, collect the userID that has just been created in the DNN user table and then insert that UserID into your personal user table with the additional data that you have collected.

These are my first thoughts and would probably  be where I would personally start working. - Other developers may approach this from a completely different angle, so it maybe worth asking for second and third opinions.

I would try the asp.net forums (in the Custom Modules section), especially when you begin developing the module as the developers there will be able to share their experiences and thoughts with you.

The main thing I would say is do not alter any of the core code, tables, procedures etc.

Follow this link for Resources for Developing DNN Modules

Hope this provides you with a starting point,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
sandip
Nuke Active Member
Nuke Active Member
Posts:29

19 Jan 2006 11:29 AM  
Dear Lee,
Thank you again for your quick reply. I am feeling nice that we thinks exactly same. Infact we have already design the database accordingly (for using USERID into our tables).
We are doing the same things which you are suggesting...thanks for your suggestions and instructions... we won't change any core code (atleast not major things...)..
We are trying to instert data into our tables...but was getting some error and then DNN's registration was abruptly ending without creating new login..
I will re-debug and see how to make it work...will update you again on further developments..
Thank you for your help.

Thanking you,
Sandi
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

19 Jan 2006 1:04 PM  
Great, that sounds good, will be interested to hear how you get on.

The first step I would take is to just learn how to insert data from your form into your table without worrying about the UserID, once you have worked out how to add data to a table from DNN you should be able to move onto the next step and integrate it with the user table.

It sounds like you are well on your way, good luck,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
sandip
Nuke Active Member
Nuke Active Member
Posts:29

30 Jan 2006 7:43 AM  

Dear Lee,

 

Thanks for your support…

 

I have completed half of the module. Now, I am able to save/update registration forms from our database. We are storing few fields (username, password and confirm password) into DNN’s database as well as our database. We are taking these information from our own controls and saving into DNN’s (User, profile etc) tables. As we have completed our own registration form; now we want to hide the DNN’s controls (User, Address) so that we can just show our controls. From registration page, when we tried to put those controls into comments, we got JavaScript errors. As some of the validetors are getting called and there is ‘undefined’ value into those validators.

 

 

 

We are thinking to comment that (javascript) code too… with taking care that it should called for rest modules. So are we going right…. or is there any other way to hide the DNN’s control.

 

 

 

Please reply as soon as possible…

 

Thanking you,

 

Sandi
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

30 Jan 2006 8:00 AM  
Hello Sandi,

Glad to hear you are making progress.

If I want to hide asp.net controls then I will control this directly from the asp.net code.

I can't recall the code off the top of my head, but you can set it so that you set the visibility of a control based on what security role a user is assigned to.

So for instance, if you only want the administrators access to view the control, you can set it up so that it queries what security role the user is assigned to and if they are an administrator it will then set the visibility of the control to true.

Does this make sense?

Have you looked at the Seabury videos - I think they cover that. - Otherwise I would have a look at the code for another module where they implement links that are displayed dependant on who is logged in - the forum module or repository module should cover this.

Hope this helps, thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
sandip
Nuke Active Member
Nuke Active Member
Posts:29

30 Jan 2006 8:22 AM  
Dear Lee,
Thanks for quick response…
Yes I know that we can hide the rows or controls from ASP.net code (by setting visibility false)… but when we tried this we were getting errors of javascript… that is some of that validators are not as object or undefined. (Since they are hide..)
Another problem in this case is though we hide it, it takes space on the form… so If we hide user control..(which has first name, last name, username, password, confirm, email and website…)… we wont see it on registration page but still there will be space…. In the last we can also remove that space by using some html coding…
But our first problem is after hiding or commenting control, there should not be any error comes on page…

Regarding code for role checking… that we can do..but we want only one registration page, which should visible to all, so this is not the issue.
We will try to remove/hide control and remove the errors. Please suggest any other source or way to do this…
Thanking you,
Sandi
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

30 Jan 2006 8:38 AM  
Hi Sandi,

I may have mis-understood how you have created you module, but if you have created a completely separate module which is not an edit of the original registration page with your own asp.net controls, why do you have elements of the original DNN registration form that you no longer require?

Can't you simply just delete these controls and remove the validation?

Thanks,



Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
sandip
Nuke Active Member
Nuke Active Member
Posts:29

30 Jan 2006 9:46 AM  
Dear Lee,
We have changed the DNN’s registration page and put our own controls (Customer Control and Contact Control). While doing this we preferred to use DNN’s Registration page, since we want to use rest DNN’s functions. Now we have our controls at registration page and we want to remove ‘User’ and ‘Address’ control.
We will try to hide them or remove them with their code and validation java script. We are not able to find, from where it’s validation script is calling. Once we find this we will remove it. So that no call to script will be given. Hope you have cleared what is our problem. So, mean while if you find any help on this please send us.
Thanking you,
Sandip
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

30 Jan 2006 9:51 AM  
Hello,

Ok, that makes more sense now. - I would personally create a completely separate module as it will make it easier for upgrading in the future. - But if you are sticking with this method, you will find the code for the address section and other DNN controls in the controls folder - address.ascx file.

Thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
sandip
Nuke Active Member
Nuke Active Member
Posts:29

30 Jan 2006 11:27 AM  

Dear Lee,

 

We have commented the code for User control from registration page. Also in User control we have remove the Requiredfieldvalidators. Still we are getting javascript error in function ValidatorOnLoad() {} and one more function. (I have pasted some funcations here from webUIvalidation.js... I copied it where I got error while debug it...)

 

We have removed validators from User.ascx and code from user.ascx.vb. Also Removed code from Registration page (register.ascx and register.ascx.vb) which is calling User control. And still that script is calling.  We don’t why and from where is getting called.

 

We just want to stop that script to be called. And I think we can’t to that as this file is having path as http://localhost/…WebUIValidation.js  . There is no such file exist when I search through my machine.

 

So this may be the run time generated file. Well, so we need to restrict to get calling this file.

 

Can  you suggest some way , how to do this.

 

Thanking you,

 

Sandi

************************************

http://localhost/...webUIvalidations.js

var Page_ValidationVer = "125";
var Page_IsValid = true;
var Page_BlockSubmit = false;
function ValidatorUpdateDisplay(val) {
    if (typeof(val.display) == "string") {   
        if (val.display == "None") {
            return;
        }
        if (val.display == "Dynamic") {
            val.style.display = val.isvalid ? "none" : "inline";
            return;
        }
    }
    val.style.visibility = val.isvalid ? "hidden" : "visible";
}
function ValidatorUpdateIsValid() {
    var i;
    for (i = 0; i < Page_Validators.length; i++) {
        if (!Page_Validators.isvalid) {
            Page_IsValid = false;
            return;
        }
   }
   Page_IsValid = true;
}
function Page_ClientValidate() {
    var i;
    for (i = 0; i < Page_Validators.length; i++) {
        ValidatorValidate(Page_Validators);
    }
    ValidatorUpdateIsValid();   
    ValidationSummaryOnSubmit();
    Page_BlockSubmit = !Page_IsValid;
    return Page_IsValid;
}
function ValidatorCommonOnSubmit() {
    event.returnValue = !Page_BlockSubmit;
    Page_BlockSubmit = false;
}
function ValidatorEnable(val, enable) {
    val.enabled = (enable != false);
    ValidatorValidate(val);
    ValidatorUpdateIsValid();
}
function ValidatorOnChange() {
    var vals = event.srcElement.Validators;
    var i;
    for (i = 0; i < vals.length; i++) {
        ValidatorValidate(vals);
    }
    ValidatorUpdateIsValid();   
}
function ValidatorValidate(val) {   
    val.isvalid = true;
    if (val.enabled != false) {
        if (typeof(val.evaluationfunction) == "function") {
            val.isvalid = val.evaluationfunction(val);
        }
    }
    ValidatorUpdateDisplay(val);
}
function ValidatorOnLoad() {
    if (typeof(Page_Validators) == "undefined")
        return;
    var i, val;
    for (i = 0; i < Page_Validators.length; i++) {
        val = Page_Validators;
        if (typeof(val.evaluationfunction) == "string") {
            eval("val.evaluationfunction = " + val.evaluationfunction + ";");
        }
        if (typeof(val.isvalid) == "string") {
            if (val.isvalid == "False") {
                val.isvalid = false;                               
                Page_IsValid = false;
            }
            else {
                val.isvalid = true;
            }
        } else {
            val.isvalid = true;
        }
        if (typeof(val.enabled) == "string") {
            val.enabled = (val.enabled != "False");
        }
        ValidatorHookupControlID(val.controltovalidate, val);
        ValidatorHookupControlID(val.controlhookup, val);
    }
    Page_ValidationActive = true;
}

leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

30 Jan 2006 11:45 AM  
Hello,

I would suggest putting a request into the module development forum here: http://forums.asp.net/98/ShowForum.aspx

Hopefully they will be able to provide you with further advice,

thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
sandip
Nuke Active Member
Nuke Active Member
Posts:29

03 Feb 2006 8:01 AM  
Hello Lee,
Hope you are doing fine..
I have removed the controls successfully... Glad to let you know that the solution behind it was very simple.... Just remove the register line (on top of the page, which uses to register the control) and controls tag from register.ascx.... thats all and rest is workign fine..
No control ref in register page hence no error.... :-)
Thanks,
Sandi
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

03 Feb 2006 8:10 AM  
Hello, Yes I'm good thanks.

- Ah yes, of course! The solutions are always very simple!

Cheers,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
j_singal
Nuker
Nuker
Posts:14

22 Feb 2006 6:42 AM  

Hi Sandip and Lee,

I also working on to change the register module. Could you help me also with the step by step and which files that you change?

Please advise...

leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

22 Feb 2006 6:51 AM  
Hello,

The first thing I would do is check out this module:
http://dnn310.ucanuse.com/PortalModules/UserAttributes25/tabid/57/Default.aspx

to see if it fits your needs, it may save you a lot of time with programming. - I haven't used the module, so I can't provide any feedback on it, but it may help. - Otherwise perhaps Sandi could provide a few pointers for getting started?

Thinking about it, Sandi, if you want to put an article together, I could publish it on the magazine with a link back to you if you wish.

Thanks,

Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
j_singal
Nuker
Nuker
Posts:14

22 Feb 2006 6:56 AM  
Hello Lee,
Thanks for the fast reply, yes I have been read about this "ucanuse" module but the problem is we are in the early stage of define a portal so I am not sure if the management is willing to buy a 3rd party module.

If Sandi can provide an example it will be great. Also it will be perfect if it's a separate module.

Kind Regards,
sandip
Nuke Active Member
Nuke Active Member
Posts:29

22 Feb 2006 7:53 AM  

Hi J_Singal,

For changing register module you will have to change core code. So first make sure that you have source copy of DNN.

Then do as per following.

1. Try with one single text box first. Change register control and add simple text box to it. Just to sure for GUI is working.

2. Then try to change code and insert values into your table from your text box.

3. Above both steps are for just getting confidence that things are working. Then you can start with making controls and add bellow to user control (which is in register module).

I am assuming that you have gone through the core code to understand how DNN's register module works.

Let me know if get success in first two..then we will go further..

Sandi

j_singal
Nuker
Nuker
Posts:14

22 Feb 2006 9:27 AM  
Hi Sandi,
Thanks.. Ok.. today I already put 2 textbox and 1 dropdownlist into a new usercontrol called "asefuser.ascx".
And after that I add this new usercontrol to "Register.ascx" just below the "user.ascx".

BTW I am using DNN 4.02

But what I am confuse is that I also have to change others files as well, like those are in the DotNetNuke.Library/Components/Users/UserInfo.vb and
DotNetNuke.Library/Components/Users/UserProfile.vb

Am I doing the correct way?
sandip
Nuke Active Member
Nuke Active Member
Posts:29

22 Feb 2006 11:22 AM  
Hi J_Singal,
You have created your own usercontrol and added into register.ascx is right. Now
tell me whether you want to change registration form completely or partially.
If completely then you don’t need to change DotNetNuke.Library/Components/Users/UserInfo.vb. You can create your own class files (asefuserinfo.vb and asefusercontroller.vb) and use it.
If partially then you will have to change DotNetNuke.Library/Components/Users/UserInfo.vb and adjust your fields with UserInfo fields… actually this is very easy as you will just have to add your fields everywhere.

Note: I would suggest create your own classes and controls. And then just remove DNN’s controls from register page and call yours.

Sandi
j_singal
Nuker
Nuker
Posts:14

23 Feb 2006 12:12 AM  
Hi Sandi,
Yes that's right I have added my usercontrol to the register.ascx.
And actually I only need to change this registration form partially.

I have tried to create my own classes and controls but as I remember last time when I tried, at the end I always end up to change some core classes that I didn't really want to change. this classes are something related to UserProfile class or UserInfo class.

Thanks Sandi & Lee, I hope you can help me on this
sandip
Nuke Active Member
Nuke Active Member
Posts:29

24 Feb 2006 4:58 AM  
Hi J_Single,

Ok, if you want to change registration form partially then no problem. Go ahead and change core classes...there is no harm in it.. I had also changed it and tested it was working fine. In registration there are three controls. You can directly change any of it. Or add your own and replace with existing one. (If you replce then you will have create own classes.) If you modify DNN's control then modify accordingly to all places (.vb files)...this will resolve your problem..
Let me know for further problems...
Sandi
leesykes
DNN Creative Staff
Nuke Master III
Nuke Master III
Posts:3351

24 Feb 2006 5:12 AM  
Just remember that if you adjust the core code, if you want to upgrade DNN at any point you will have to also backup / re-add the core changes that you have made.

It is much easier for future development to add features to DNN (modules) rather than change the core. -  Just something to consider.


Lee Sykes
Site Administrator
Subscribe to the website : DotNetNuke Video Tutorials : The Skinning Toolkit : DotNetNuke Podcasts

Twitter: www.twitter.com/leesykes

Lee Sykes's Facebook Profile
j_singal
Nuker
Nuker
Posts:14

24 Feb 2006 10:20 AM  
Hi Sandi and Lee,
Thanks for your suggestions. Currently I try to do it in separate module. I copied the register.aspx to my new module folder and start develop from there.
Will get back to you next week
j_singal
Nuker
Nuker
Posts:14

28 Feb 2006 8:43 PM  
Hello there,
Good news, I successfully make changes to the registration module. Thanks for both of you!
sandip
Nuke Active Member
Nuke Active Member
Posts:29

01 Mar 2006 10:19 AM  
Thats Good.
cybersurfer

Posts:10

13 Mar 2006 6:43 AM  
Hi Guys

I see everyone here is having great successes in modifying the registration module. I'm glad I'm not the only person that needs to do so. Which files need to be modified such that I can add fields to the registration from and remove fields from the form? Also when adding and removing fields what effectively is being changed in the core of the DNN framework?

I will also require that the login module be modified once the registration module is complete because the fields that I will require the User to enter are not a username and password.
cybersurfer

Posts:10

16 Mar 2006 4:56 AM  
Posted By sandip on 03 Feb 2006 8:01 AM
Hello Lee,
Hope you are doing fine..
I have removed the controls successfully... Glad to let you know that the solution behind it was very simple.... Just remove the register line (on top of the page, which uses to register the control) and controls tag from register.ascx.... thats all and rest is workign fine..
No control ref in register page hence no error.... :-)
Thanks,
Sandi


Hi Sandi

I see that you managed to find successfully sort out the javascript problem you were having. Which line exactly were you removing in the register.ascx file to get rid of the javascript errors?

Thanks
Darryl
You are not authorized to post a reply.
Page 1 of 212 > >>

Forums > DotNetNuke® > DotNetNuke® Questions > How to customize the DNN's Register Module



ActiveForums 3.7

Latest Forum Posts

Web.config Error by derpir
HelloI got this error, does this seem familiar to you? Can anyone say how to fix this error?Error 98...
No Access for me too by ristori
I suscribe for the magazine novembre 2008 13. I receive this ticket from Paypal : Prix de l...
How can I list our offices by country by bluehoops
Hi everyone!Apologies if this is a simple question, but it is driving me nuts.I run a small ISV and ...
RE: DNN Creative vs FireFoX V3 by DavidWSnow
It now looks like the error'ing extension is StumbleUpon and it effects FireFox on some, but not all...
Issue 39 Authentication by DavidWSnow
I was glad to see you address this topic. When LiveId was first added to DNN, I tried to implement i...
RE: (catalook) Itempane changes on product pages ?? by Vilaplana
Hi, I think the problem is been caused by your skin and not by Catalook itself.  In the main page, C...
Yahoo Answers by cdtguru
Hey, i was wondering if anyone knew of a module that would create a similar system to Yahoo Answers...
(catalook) Itempane changes on product pages ?? by Gaz35
Hi , hi , I don’t know if you can help me , here is the site in question http...
RE: Virtual Pc 2007 help by jeff@zina.com
You need to get the Virtual PC's network set up.  Might check the Virtual PC news group: http://www...
DNNCreative Just Keeps Getting Better by jeff@zina.com
Kudos on issue 39, the article on importing large quantities of data was both timely for me and spot...
RE: Videos by clippy
Hello from France My question is about the videos for beginners, and specially n° 3; I'm working...
skinning trouble by derpir
HelloI have uploaded a skin to my DNN-website, but I want to make som changes. I have made some chan...
RE: Column width in UDT by VickySwift
In case anyone else is looking for the answer to this, I have been able to add the headers back in b...
RE: search not working by jncraig
Did you either reindex the site to turn on the scheduled task to do it?
RE: Template Issue by jncraig
No, you need to install your custom modules before you use the template.
RE: error message in registration page by jncraig
I'm not sure that you can avoid them, short of rewriting the module.You might want to investigate Dy...
Template Issue by Bobbyjosephg
Hi,   Today I have come up with a problem with templates.I was successful in exporting a template an...
RE: search not working by sanju_k1421
I checked     host==>admin search  page   that is set both limits min //max  page     still i m n...
RE: error message in registration page by coder247
but how do I avoid the error messages provided by default in dnn?
RE: Style sheet does nothing by andorz
Oh. I was told to do that in my thread at the dotnetnuke.com forum. http://www.dotnetnuke.com/Commun...