New Account Form Mod
|Downloads of New Account Form Mod are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account|
|New Account Form Mod|
|Summary||Changes $text variable for override and adds a Reason to Request an account|
|Validation||This mod is XHTML compliant.|
|Mod Updated||25 Oct 2014|
|Download stats||View download statistics|
|Homepage||New Account Form Mod (This page)|
|Mod Support||TNG Community Forums|
|Latest Mod||188.8.131.52 for TNG v9 and up|
8.1.0 for TNG V8
1.1 for TNG V7
|Min TNG V||7.0.0|
|Max TNG V||11+|
You need to edit the config file to reflect your own reasons for a User Account Request and the information required in the Notes field.
If using multiple languages, please add the custom text for your other language files.
Note that with TNG V8, $text['acctcomments'] is used for the newacctform.php and can be overridden using the normal custom text overrides in cust_text.php without impacting the use of $text['comments'], which might eliminate the need for this mod.
This sample mod:
- changes $text[comments] to $text[usercomments] to make it easier to override the text since $text[comments] is also used elsewhere within TNG V7 and provides the languages/English and English-UTF8/cust_text.php overrides for $text['acctcomments'] for TNG V8
- adds a $text[userreason] to indicate when a User Account is required
- makes the Phone Number a required field
- makes the Notes a required field
This mod Automated Install was tested on TNG 7.1.0 and above. The mod will work with other TNG version where you are using the Mod Manager, or you will need to figure out what line numbers to modify, since no Manual Install instructions are provided.
The New Account Form Mod is provided as an example of how to modify the New Account Form (newacctform.php). Since this will be unique to each site, you will need to edit the config file for the text you want to display and whether you want to make certain fields required or not.
Note that you cannot use php comment characters to comment out lines in the Mod Manager config file, you need to remove the lines. You can add comments between the end of a keyword parameter and the start of the next keyword parameter sequence. See Mod Manager Syntax
Ken Roy developed this mod with help from several other TNG users on the Forum or User2 list.
- identifies the reason you need a User ID on your site, such as to view information on living cousins
- reduces the number of User Account requests received from people who are related to ancestors in the 1600s and 1700s
- eliminates the need for additional correspondence with the requester to determine how they are related to a person in your family tree
|V10.0.0.1||25 October 2014||Reworked mod for TNG V10 provided by Bryan Larson. Updated for TNG 10.1 to add Wiki icon and URL generated by %wikipage:New_Account_Form_Mod%|
|V184.108.40.206||2 February 2012||Reworked mod for TNG V9.|
|V8.1.0||24 May 2010||Reworked mod for TNG V8|
|V1.1||17 December 2009||Changed hard-coded name to use $dbowner to make it usable on all sites, increased the number of rows and added a width="30%" to the column for the $text[usercomments] that replaces Notes, based on feedback from Bryan Larson|
|V1.0||17 December 2009||updated config file and published to TNG wiki. Original Mod Manager config file was created on 25 May 2009 but not uploaded to the TNG Wiki.|
- Download the appropriate distribution for your TNG version from the download links in the status area in the upper right.
- Extract the geocode_assist.zip to your admin/mod_folder (V7) or mods (v8).
- Edit the config file as appropriate for how you want to modify the New Account Form. This mod is provided as an example on how I modified the form for my site as shown in the Visual of Mod below.
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the new_account_form.cfg.
Custom Text Additions
Note that config file only includes the English language changes, so if you support multiple languages you will need to modify the config file to add the custom text for your other languages, or you need to manually add the custom text.
The following custom text will be added to your English/cust_text.php file by this mod. If you are using other languages, you must add these lines to each of your language cust_text.php files with appropriate translations of course.
// New Account Request Form additions // Reason why you need a User ID on our site $text['userreason'] = "Note that you must provide a direct connection to the <strong>person ID (Innnn) of your grandparent, great-grandparent, or great-great-grandparent</strong> who is in our database. A User ID is only needed to view information on <strong>Living Cousins</strong>, and will only be approved if you provide information that documents your relationship to a person already in our family tree. <strong>Relationships from the 1600-1700 are too far removed for me to grant access to Living people.</strong> Thanks. $dbowner"; // Change to Notes field $text['acctcomments'] = "Person ID of person you are related to and relationship *:<br /><br />Please enter the <strong>person ID (Innnn) of your grandparent, great-grandparent, or great-great-grandparent</strong> who is in our database and indicate how you are related to that person and thus to our family tree. A user ID is only needed to view Living cousins. <strong>Relationships from the 1600-1700 are too far removed for me to grant access to Living people.</strong> <br />Thanks. $dbowner"; // Make Phone Number and Notes field required $text['enterphone'] = "Please enter your Telephone number."; $text['enterusercomments'] = "Please enter Person ID to whom you are related and how you are related to that person, including the information on your parents and grandparents.";
For TNG V7, $text['acctcomments'] in above text additions was $text['usercomments'].
French Custom Text
For example, you would add to the French/cust_text.php
// New Account Request Form additions // Reason why you need a User ID on our site $text['userreason'] = "Notez que vous devez fournir une parenté <strong>directe à l'identification de personne (Innnn) de votre aïeul, bisaïeul, ou trisaïeuls</strong> qui est dans ma base de données. Un compte d'utilisateur est seulement nécessaire pour voir l'information sur les cousins et cousines en vie. <strong>Les parentés du 1600-1700 sont trop lointains enlevés pour que j'accorde l'accès aux personnes vivantes.</strong><br />Merci. $dbowner"; // Change to Notes field $text['acctcomments'] = "Veuillez écrire <strong>l'identification de personne (Innnn) de votre aïeul, bisaïeul, ou trisaïeuls</strong> qui est dans ma base de données et indiquez comment vous êtes lié à cette personne et ainsi à notre arbre généalogique. Un compte utilisateur est seulement nécessaire pour voir l'information sur vos cousins et cousines vivants. Les parentés du 1600-1700 sont trop lointains enlevés pour que j'accorde l'accès aux personnes vivantes. <strong>Si vous n'êtes pas parent, un compte utilisateur ne sera pas fournie.</strong><br />Merci. $dbowner"; // Make Phone Number and Notes field required $text['enterphone'] = "Veuillez écrire votre numero de téléphone."; $text['enterusercomments'] = "Veuillez écrire <strong>l'identification de personne (Innnn) de votre aïeul, bisaïeul, ou trisaïeuls</strong> qui est dans notre base de données et indiquez comment vous êtes lié à cette personne";
For TNG V7, $text['acctcomments'] in above text additions was $text['usercomments'].
Visualization of this mod
Without this mod, the Register for New User Account Form displays as shown in the image on the right.
With Mod Installed
With the New Account Request Form Mod, the New User Account Form includes a Reason for requesting a User Account above the form, and what information you should enter in the Notes field that now is shown as Person ID of person you are related to and relationship as shown in the image on the right. The Phone Number and Notes field were added to the required fields, so will display a message if left empty.
Sites using this mod
If you download and install this mod, please add your TNG site to the table below:
|Our Roy and Boucher Family||Ken Roy||I use this TNG mod to indicate my requirements for a User ID.||10.0.0.1||11.0.0||EN, FR|
|R G Strong Family Genealogy||Russell Strong||Public Site||10.0.0.1||12.0.1||EN, FR, DE, NL|
|Leverette Family History||Jeff Leverette||10.0.0.1||10.1.3||EN|
|OurLife Family History - McMullen Clan||Sean Thompson||Not a public site||10.0.0.1||11.1.0||English|
|Our Acadian Family||Randal Suire||Modified Mod - comments on right side. Media/Private||10.0.0.1||12.0.1||En, Fr|