bobbyjosephg
Nuke Pro Posts:82
|
07/26/2007 10:00 AM |
|
Hi, I am new to DNN.I want to create a custom login and Registration module.I dont know from where to start.I have created two sample modules and they are working fine.Is there any tutorial or some other form fo help to create a custom login module.
Thanks Bobby |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/26/2007 11:16 AM |
|
I'd suggest that you start by seeing if you can simply style the existing login module. If not, you could create a "new" module by modifying the existing one. I think that you want to start with /admin/security/signin.ascx.
But ... I'd really recommend that, as a newcomer, you try to accomplish what you need with skins, styling, etc. rather than by writing custom modules.
What do you need/want that's not provided by the existing functionality? |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
bobbyjosephg
Nuke Pro Posts:82
|
07/27/2007 12:20 AM |
|
Hi , Thanks for the reply.Why I want a custom module is beause the default module has a register button, I want a link in it's place .I could not figure out a way to change this.Also for the default registration page I need more details to be saved.I think now you have understood my requirement.
Thanks, Bobby |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/27/2007 8:46 AM |
|
Thanks for clarifying this. There are three buttons: Login, Register and Forgot Password. Are you aware that you can style buttons to make the button part go away, underline the text and "almost" make a button look like a hyperlink? I did some quick playing around and was able to get everything but the hover behavior. Perhaps there are ways to do this. If you really do want to change buttons to hyperlinks (there actually are 3 buttons in the signin module), I would think that you could change the buttons in /admin/security/signin.ascx to HTML hyperlinks. If you make that change and make corresponding changes to the signin.aspx.vb file, that might be all that you need. As for needing to save more details for registration, click on "Users" and then on "Manage Profile Properties" at the bottom of the User Accounts screen. You'll find that you have considerable control over what information is collected at registration time, including what is mandatory and what is not. And, you can add your own fields. Be sure to take a look at How to Manage Profile Properties in User accounts (Creating a custom registration page) for a detailed look at this feature. I hope that this helps. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
bobbyjosephg
Nuke Pro Posts:82
|
07/27/2007 11:56 AM |
|
Hi , Thanks for the reply I tried it and it worked.Is it possible to ad other modules to the registration page.Like I have the task of building a shopping cart.There are liks to featured Items common items , Login etc that should be displayed on the left and right.
Regards, Bobby |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/27/2007 4:05 PM |
|
The short answer is yes. The login module is just a module. You can put other modules on the page.
If you'll take a look at stockcentral.com you'll see another approach. There, we put the login module on every page, but it disappears when you login. The "normal" placement of username and login/register/logout link in the upper right has some conditional code so that it is invisible until you log in. That way, there's always a way to login or to logout. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Kim Seav
Nuke Newbie Posts:6
|
07/31/2007 12:01 AM |
|
Hi,
I'm having a similar problem with customising modules. At present our setup is one DNN install and multiple portals hosting a number of unique websites. I've found that it is difficult to customise certain features to suit with each portal. Say I want to change the LOGIN module in the ADMIN/SKINS (AppResources, ascx files) folder, if I do this say change "username" to "org name" or change the positioning of the boxes or text, this change will reflect on all portals as this is the core file. I don't want this to happen as this will not suit with all client's sites.
Is there anyway to customize and style a module according to each portal's needs without it affecting everything within our other sites?
Thanks, Kim |
|
|
|
|
bobbyjosephg
Nuke Pro Posts:82
|
07/31/2007 5:47 AM |
|
Hi Kim, you can try creating a new module for the login and then include it in the portals you need.To create a new module open DNN source from visual studio and then create a new webuser control and then copy the code from teh sigin.ascx.This should work .Please test this before deploying it.I have created this in this way.Can send it if you want. Thanks Bobby |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
07/31/2007 6:51 AM |
|
I think that the first commandment of DotNetNuke installations should be: THOU SHALT NOT edit code! (There are times that you'll break this commandment, of course, but you should really take it seriously.)
Most of the "canned" text that appears on the screen of a DotNetNuke installation is "localized" text, which means that it's not included in the source code, but is included in special text modules that provide the text in various languages. If, for example, your site's language is German, much (most? all?) of the text should appear in German. Many modules also contain localized text.
The localized text is accessible via the Languages menu item that's available on both the host and the administrator tabs. I haven't ever considered this before, but I assume that the two tabs are different and that the host can customize text for the portal and that the administrator can customize for the site. But I haven't checked this out.
In any event, if you click the Languages tab and then use the Language Editor (it's in a dropdown list next to the Languages module name) you can access and modify the standard text. Once you are in the Language Editor you can also access and modify the localized text that is applied to any modules that have localized text. If you look on the left you'll see a directory tree that includes Local Resources and Global Resources.
Expand the Local Resources area. If you are interested in changing the text for Signin.ascx, look under Local Resources\Admin\Security\App_LocalResources\signin.ascx.
It will probably help to dig through the code to see which items you want to change, but change them here, and refrain from editing text in the modules.
|
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
bobbyjosephg
Nuke Pro Posts:82
|
08/06/2007 12:41 AM |
|
Hi Joe, Thanks for the advice.I shall not edit the DNN module.I want a custome login module where the email-id should be the user id .Is there any way to configure this or should I create a new module for this. |
|
|
|
|
Rui Silva
Nuke Newbie Posts:2
|
08/06/2007 6:08 AM |
|
Hi all, I'm a portuguese developer and a "frequent" reader (subscribed) of this site.
I have a similar need for custom login module, with the exception that I must validate users against different schemas.
In my scenario, I have to validate users against the normal aspnet_membership tables, but if found there, I must go to another table (oracle) and check for some flags to finaly choose if a certain user has the ability to login or not, and if not, redirect to a custom registration screen.
I suppose creating a new module based on ~/admin/signin.ascx is the way to go and insert there the new access and validation code.
Has anyone already made this kind of approach that could mail (or just answer here) the basics for this ?
I'm having lots of errors and would like to try to shortcut this as much as possible.
My current scenario is: DNN version 4.5.0 Visual studio 2005 sql server 2005 (DNN) Oracle 10i (custom app) Web Application project with references to dotnetnuke.dll, dotnetnuke.provider.membership.sqldataprovider, dotnetnuke.sqldataprovider, dotnetnuke.webcontrols, dotnetnuke.webutil and sharpzlib.dll (this is for my custom login module)
any help or orientation greatly appreciated Rui Silva |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
08/06/2007 8:26 PM |
|
If you want to authenticate users against an external user database, you don't want to modify the login module. Instead you want to create a custom Membership Provider. You'll probably also want to create custom Profile and Role providers, too.
I believe that there are commercially available providers that will allow you to run DNN with Oracle, too. But, that's a different issue than authenticating against a second database of users. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
bobbyjosephg
Nuke Pro Posts:82
|
08/07/2007 1:43 AM |
|
Hi Joe, Thanks for the reply, but how do you create a custom Membership provider.
Thanks & Regards Bobby |
|
|
|
|
Lee Sykes DNN Creative Staff
Nuke Master VI Posts:4945
|
|
Kim Seav
Nuke Newbie Posts:6
|
08/09/2007 9:09 PM |
|
Hi Bobby
Thanks for your response. I'm thinking that it sounds like what you've had to do to create a new module is something our programmer does, I was really wanting to know if there was something I could do myself as a front-end developer. Wouldn't mind haveing a look at your file though. Would you mind sending it?
Thanks!! |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
08/10/2007 6:36 AM |
|
Kim,
>Is there anyway to customize and style a module according to each portal's needs >without it affecting everything within our other sites?
Yes, there is, and that's exactly the point to using DotNetNuke. Of course, if you start modifying code, you'll break that. This is one of the reasons we recommend against modifying the DotNetNuke code.
You can customize all (most?) of the text in DotNetNuke by modifying the localized text using the Language Editor. A site host can do this and the changes propagate to every portal. But, I think that modifying at the portal level keeps the changes local to the portal.
If you want to use skins, a portal administrator can install skins that apply only to his portal. Those skins can customize a portal independent of all of the other portals on the site. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
Apdev
Nuke Newbie Posts:1
|
08/23/2007 3:30 AM |
|
Hi Guys,
In DNN, instead of accessing the database directly via membership provider, I would like the DNN gets the data via Web Services.
In addition to the basic login features, I would like to add more functionalities such as code genarator for each user and captcha number. This architecture seems to be used mostly in a commercial setting for security reasons.
My questions: 1. Is it possible to do this in DNN without breaking the flexibility aspect of the provider pattern?If so how? 2. Which one is more visible, creating a new login module and remove the default one or just modifying the basic login module with the new requirements?
Thanks.
Agung
|
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
08/23/2007 7:46 PM |
|
It would be better to replace the "stock" Membership Provider with a custom version. You may also want to look at the Role and Profile providers, too.
The existing providers will show you how they were set up, and also the functionality that you have to provide.
If you do this, you can guarantee that the higher-level DotNetNuke functionality is not damaged ... |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|
julien
Nuke Newbie Posts:2
|
09/06/2007 4:13 PM |
|
Hi everyone, im kind of new with dnn and my problem with the registration module is this. Im developping a multi-language site. I'm aware of the possibilities with the localized text to set different text for a selected langage, but I need to go further... I need to populated a list (i.e: status: married, single, divorced..) but i need 2 groups of item (one for each language). How is it possible to add custom control to that module, because when im going in "Manage Profile Properties"-->"Add New Profile Property", the data type are limited. SO even if im solving my list problem, I will encounter some new difficulties if I need to customize the registration module further. Can anyone give me a clue, or simply a global way to approach this Thanks |
|
|
|
|
Joseph Craig DNN MVP Posts:11667
|
09/06/2007 7:50 PM |
|
You can create list types of data in the profile. And, when you create a new item, you can add localized text for the item. I believe that you can create localized text for every language that you have installed. |
|
Joe Craig, Patapsco Research Group Complete DNN Support |
|
|