Add custom registration instructions to the DNN user account registration page

Blog 2
Location: BlogsAll BlogsDNN Tips    
Posted by: mamlin 3/12/2008 5:11 PM

Have a DotNetNuke portal with open registration and wish you could freely add your OWN instructions to the DNN user account registration screen?  Sure, you can edit the input field names (to change "Username" to "LoginName", for example) but what if you wanted to put the message "*** Please use your Email address as your Username ***" at the top of the user account registration page?  Here's one FREE way to do it without changing any DNN code...

 
Language Editor
Your DNN portal's "Admin" menu has a "Languages" option.  This is not the most intuitive name for an option that does much more than simply specify a particular language for your site.  Within the "Languages" option there is an area that allows you to edit certain Resource File data.  This area lets us take control of a number of items like the text that appears in the Privacy Agreement or the text contained in those password reminder emails.

For adding instructions to the Registration page, we're specifically interested in the resource item named "MESSAGE_REGISTRATION_INSTRUCTIONS.Text". 

Go to ADMIN -> LANGUAGES -> LANGUAGE EDITOR and then scroll waaaay down to the "MESSAGE_REGISTRATION_INSTRUCTIONS.Text" item.  You could add your text/HTML right there in the editor box but, instead, click the little gray box with an arrow inside to open up the full text editor.  Anything you enter here will appear above the registration entry fieldson the account registration screen.

 
Profile Problems
There is one notable issue to this solution:  any text you add for the account Registration page will also appear at the top of the User Profile screen.  This could make for a somewhat confusing User Profile.  What to do?

One solution is to add script to your instructions to dynamically show or hide the instructions based on the user's login status.  If the user is NOT logged in we can assume the user is not looking at a User Profile and therefore must be attempting to register a new account.  In this case, we'd use script to reveal our registration page instructions.

Example (only for portals with open registration):
(1) First, place your instructions inside a DIV, give that DIV a unique ID and set the style of the DIV to include "display: none".
(2) Add script after the container to test the user's login state and, if NOT logged in, alter the DIV's style from "display: none" to "display: inline".  The script determines the login state by looking for the DNN "Register" link (default DNN link with ID "dnn_dnnUSER_hypRegister").
 

Example code:
(Note: remove the extra spaces after each "<" and before each ">" if you copy-and-paste)

 
< DIV id="myRegInstructions" style="display: none" >
 NOTE: Please use your email address as your Username.
< /DIV >

< SCRIPT >
  try
  {
    // This script reveals the 'Register Instructions' box
    //   if the user is not logged in.

    var tmpStr = document.getElementById("dnn_dnnUSER_hypRegister");
    var tmpStr1 = document.getElementById("myRegInstructions");
    if (tmpStr.innerHTML == "Register")
    { tmpStr1.style.display = "inline"; }
  }
  catch (e)
  {}
< /SCRIPT >

Permalink |  Trackback

Comments (1)   Add Comment
Re: Add custom registration instructions to the DNN user account registration page
almny.com    5/17/2009 11:32 PM
perfect -- thanks man


Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
You are here:  
 
>> Back to the top of the blog list...

 
        account   blog   click   cloud   code   create   data   events   example   feature   file   files   free   function   good   google   just   line   links   list   module   modules   need   note   number   option   page   pages   query   results   role   roles   script   search   select   settings   simple   site   skin   solution   step   tags   terms   time   user   users   value   version   want  
Minimize Google AJAX Search
 
Search ES:  
This is an example of a Google AJAX Search with asynchronous search execution for two searches.  See our blog series, 'Add Google AJAX Search to your DNN skin' for info and sample code.
 
     
Minimize Buy Stuff
 
Stuff by Eguana Solutions
(Be sorta cool!)
 
     
Minimize Most-Commented Blogs
 
 
     

Minimize Looking for more info?
 

There are tons of helpful
posts from Eguana Solutions 
on the DotNetNuke.com forums.
  
 
Click HERE to see our posts.

 
     
Minimize Modules for Sale
 

Looking for Eguana's modules? 
We're still working on them!
  

Until ours are ready to dazzle and
amaze, you'll have to make do with
the thousands of modules already
available on SnowCovered.

 
     
Minimize Favorite Modules
 

There are many great DNN modules.
A few we highly recommend are:
 
Dynamic Registration
Total control over the user signup process.  Create custom forms, execute your own SQL, use the integrated payment processing features to assign user roles, validate USERNAMEs via AJAX and much more.  Very cool.
 
URL Master
Change to friendly URLs that really ARE friendly.  Add keywords into your page URLs for better SEO.  Create 301 redirects for individual pages.  Force visitors (and search bots) to a single domain (i.e., make everyone use the "www" version of your site's URL or vice versa).  One of the single best upgrades for any DNN site.
 
Document Exchange 5 (DMX5)
Drag-and-drop from Windows Explorer directly into the DMX file manager!  File versioning, file and folder moderation, extend user permissions down to the file level (for user groups and even for individual users).  Infinite file and file info presentation options via custom display templates.  Store files locally or remotely via UNC (i.e., can securely store files somewhere besides your web server).  Much more.
 
XMOD by DNNDev
Rock-solid form module for data collection.  From simple feedback / email forms to complex, multi-part tabbed forms.  XMOD is different from other form modules because XMOD does not create a new database table for every new form definition -- an important feature if you plan to create dozens or hundreds of forms over the life of your DNN instance!  Excellent support from the developer and an active community around this module.
 
If you desire your form module to create a new DB table for each new form definition, a great alternative to XMOD is the Dynamic Forms module from DataSprings.  Dynamic Forms offers direct DB access beyond that found in XMOD as well as an easy drag-and-drop form builder option to help you get up and running very quickly.

 
     

Login