Login Mod

If your TNG site is set to Require Login, all users are required to have a username and password to access any content. This is the simplest way to keep common webbots from leeching your site content and your web server's processing resources. However, the TNG registration process is likely to deter visitors.

An easy work-around is to create a generic Guest user account with something like username: guest, password: guest. Then assign the guest user to your public tree.

Then place some text on your front page and/or login page that gives visitors the username and password. For example, you could place the following on or about line 55 of login.php (TNG 7) or loginlib.php (TNG 8 or 9):

<table width="316" border="1">
<tr>
  <td width="306"><p class="style1"><strong>For Guest access enter</strong>:</p>
  <p style="margin-bottom: 0;">USERNAME = guest </p>
  <p style="margin-top: 0; margin-bottom: 0;">PASSWORD = guest </p>
  <p style="margin-top: 0; margin-bottom: 0;"><em><span class="style2">The guest
account has access to tree but not documents and photos. For full access, Register
for a User Account.</span></em></p></td>
</tr>
</table>

You can even save guests the trouble of typing in the username and password by pre-filling the login form fields in loginlib.php:

TNG 12: Replace

<input type="text" name="tngusername" class="loginfont <?php echo $loginfieldclass; ?>" id="tngusername" />

With

<input type="text" name="tngusername" class="loginfont <?php echo $loginfieldclass; ?>" id="tngusername" value="guest" />

AND

TNG 12: Replace

<input type="password" name="tngpassword" class="loginfont <?php echo $loginfieldclass; ?>" id="tngpassword" />

With

<input type="password" name="tngpassword" class="loginfont <?php echo $loginfieldclass; ?>" id="tngpassword" value="guest" />

Working example: Morss Family Genealogy

TNG User sites using this mod

  • Please add TNG site that you have found that utilize this modification

Site List