Login Mod: Unterschied zwischen den Versionen

 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 18: Zeile 18:
 
</pre></code>
 
</pre></code>
  
You can even save guests the trouble of typing in the username and password by pre-filling the login form fields in login.php or loginlib.php:
+
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
 +
 
 +
<code><pre><input type="text" name="tngusername" class="loginfont <?php echo $loginfieldclass; ?>" id="tngusername" /></pre></code>
  
Replace
 
<code><pre><input type="text" name="tngusername" size="20" /></pre></code>
 
 
With
 
With
<code><pre><input type="text" name="tngusername" size="20" value="guest" /></pre></code>
+
 
 +
<code><pre><input type="text" name="tngusername" class="loginfont <?php echo $loginfieldclass; ?>" id="tngusername" value="guest" /></pre></code>
  
 
AND
 
AND
  
Replace
+
TNG 12: Replace
<code><pre><input type="password" name="tngpassword" size="20" /></pre></code>
+
 
 +
<code><pre><input type="password" name="tngpassword" class="loginfont <?php echo $loginfieldclass; ?>" id="tngpassword" /></pre></code>
 +
 
 
With
 
With
<code><pre><input type="password" name="tngpassword" size="20" value="guest" /></pre></code>
+
 
 +
<code><pre><input type="password" name="tngpassword" class="loginfont <?php echo $loginfieldclass; ?>" id="tngpassword" value="guest" /></pre></code>
  
 
Working example: [http://genealogy.morssweb.com/login.php Morss Family Genealogy]
 
Working example: [http://genealogy.morssweb.com/login.php Morss Family Genealogy]
Zeile 43: Zeile 49:
 
[[Category:Mods for TNG v8]]
 
[[Category:Mods for TNG v8]]
 
[[Category:Mods for TNG v9]]
 
[[Category:Mods for TNG v9]]
 +
[[Category:Mods for TNG v12]]

Aktuelle Version vom 6. Februar 2019, 23:00 Uhr

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