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 >