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

Forum

How to customize the DNN's Register Module
Last Post 2010-11-20 11:08 AM by Joseph Craig. 59 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 1 of 3123 > >>
Author Messages
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-01-18 01:23 PM  

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

Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-01-18 07: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/PortalMod...fault.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/DNNCreative

Lee Sykes's Facebook Profile
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-01-19 03:37 PM  

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

Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-01-19 04:02 PM  
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/DNNCreative

Lee Sykes's Facebook Profile
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-01-19 04:29 PM  
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
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-01-19 06: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/DNNCreative

Lee Sykes's Facebook Profile
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-01-30 12:43 PM  

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
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-01-30 01:00 PM  
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/DNNCreative

Lee Sykes's Facebook Profile
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-01-30 01:22 PM  
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
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-01-30 01:38 PM  
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/DNNCreative

Lee Sykes's Facebook Profile
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-01-30 02:46 PM  
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
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-01-30 02:51 PM  
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/DNNCreative

Lee Sykes's Facebook Profile
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-01-30 04:27 PM  

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;
}

Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-01-30 04:45 PM  
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/DNNCreative

Lee Sykes's Facebook Profile
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-02-03 01:01 PM  
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
Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-02-03 01:10 PM  
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/DNNCreative

Lee Sykes's Facebook Profile
Jimmy SingalUser is Offline
Nuker
Nuker
Posts:14

--
2006-02-22 11: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...

Lee SykesUser is Offline
DNN Creative Staff
Nuke Master VI
Nuke Master VI
Posts:4945
Avatar

--
2006-02-22 11:51 AM  
Hello,

The first thing I would do is check out this module:
http://dnn310.ucanuse.com/PortalMod...fault.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/DNNCreative

Lee Sykes's Facebook Profile
Jimmy SingalUser is Offline
Nuker
Nuker
Posts:14

--
2006-02-22 11: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,
sandi sandiUser is Offline
Nuke Active Member
Nuke Active Member
Posts:28

--
2006-02-22 12:53 PM  

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

You are not authorized to post a reply.
Page 1 of 3123 > >>


Active Forums 4.3

Latest Forum Posts

DNN 6.2 by Sameer
Hi All i am using dnn 6.2 beta version for my demo site i need to custmize the 4 modules in that
RE: Deploying dnn by Sameer
Thanks a lot so kind of you
RE: Unable to Create Skin Package by schilders
Joe, When I click the Edit icon next to the skin package on the Host Extensions page, I receive t
horizontal main and submenu items by Dan Glanton
I found a very good tutorial on horizontal main and subitems in DNN Creative, but what about if you
RE: Skin creation - Menu questoni by Joseph Craig
This has to do with the structure of the elements that make up the skin and the CSS. Most likely, y
Skin creation - Menu questoni by CDMeyer
I have a skin and when I add more menu items to the nav bar than can fit in one row of nav, the seco
RE: FCK Editor in DNN 6 by Pingle2009
Just to follow on from Joe's reply, the 'official' line seems to be that not only that the old FCK E
RE: Slice a Site by Dan Glanton
Thanks, I'll look into that when I get a chance.
RE: Creating structured page content by Stephen Bugden
Thankyou very much Joe, I will take a look at your suggestions.
RE: Subpages or dropdowns navigation is going behind this flash by Joseph Craig
I googled a bit and found that this is a messy problem. Possibly the best solution will be to giv
RE: Subpages or dropdowns navigation is going behind this flash by vijendra
Pls check the attachment. That Iframe code we are using and subnavigations are goind behind that.
RE: Rename or move site from domain name to subdomain name by Bill Quinn
Hi Joseph, Thank you so much for your reply. I will be able to implement this later in the we
RE: Creating structured page content by Joseph Craig
Take a look at the DotNetNuke Reports Module, the DotNetNuke Form & List Module, SGSV from Tresslewo
RE: Subpages or dropdowns navigation is going behind this flash by Joseph Craig
It looks like your iframed content may have a z-index that puts it on top of the menu. I can't id
Subpages or dropdowns navigation is going behind this flash by vijendra
Hi, Subpages or dropdowns navigation is going behind this flash. Pls check the url below http://www.
RE: user adding images by rod lloyd
That worked, thank you. I did not expect those permissions to be in File Manager. I note a
RE: Unable to Create Skin Package by Joseph Craig
To be quite honest, I've never used this functionality to create a skin. What I usually do is cre
RE: Unable to Create Skin Package by Joseph Craig
I'm confused by this, too.
RE: Unable to Create Skin Package by schilders
We are running DNN 6.x
RE: Unable to Create Skin Package by Joseph Craig
Which version of DotNetNuke are you using?
You are not logged in.
You must log in to access all 
650+ videos, tutorials, podcasts, and more.
RSS Feeds