Jump to content
TNG Community

Change login.php screen content


Filip Lampaert

Recommended Posts

Filip Lampaert

How can I change the  displayed screen content  that appears after entering  login.php?

I want that the user only sees

Username

Password

Stay logged in on this computer

screen login.php.jpg

 

 

Link to comment
Share on other sites

Rob Severijns

Hi Filip,

What you're asking seems a bit Draconian to me but you will have good reasons for this request.
Can you explain why this is what you want?
Looks like your website is member only and only registered members are allowed to login.
Guess you have a seperate way of adding member requests other than the one TNG normaly uses.

Have a look at my modified login page to see how I handled it. (Link in m,y signature)
Might not be what you are looking for but maybe it is.
By the way, there are two login windows. The one on the index.php and the one for the menubar.
Do you want both changed?

 

Link to comment
Share on other sites

Filip Lampaert

Hello Rob,

My site is, for the moment, private.  (11 people of my family).

They all use the same login and password and can contact m by phone if they forget the login and password.

I want both logins changed.

 

 

 

 

 

Link to comment
Share on other sites

Rob Severijns

Hi Filip,

Try this.

1. In login.php

Add this

$cms['cloaklogin'] = "1";

just before

tng_header( $text['login'], $flags );

That hides the login button in te menubar so login can only take place via the presented login page.

2. In the index.php in the TNG root enter this

if (!$currentuser) {
   header('location: login.php');
 exit;
}

right after:

include("tng_begin.php");

this will redirect users to the login.php

 

3. Rename your current loginlb.php into loginlib_old.php.

Upload the new loginlib.php (in attached zip) into the TNG root.

Go to your website and hopefully "Voila"

 

loginlib.zip

Link to comment
Share on other sites

If you just want to hide the text you crossed out in your top post, I was able to accomplish this (on my TNG 14.0.6 site) by placing HTML comment tags around two sections of loginlib.php

Here

<!--
<input type="checkbox" name="resetpass" value="1" onclick="if(this.checked) {$('#resetrow').show(); $('#loginsubmit').prop('disabled',true);} else {$('#resetrow').hide(); $('#loginsubmit').prop('disabled',false);}" /> <?php echo $text['resetpass']; ?>
-->

and

<!--
<div class="normal" id="forgot" style="clear:both">
	<p><?php echo $text['forgot1']; ?></p>
	<input type="text" class="forgotfield" name="email" id="email" placeholder="<?php echo $text['email']; ?>"/> <input type="submit" value="<?php echo $text['go']; ?>" />
	<div id="usnmsg" class="smaller"></div>

	<p><?php echo $text['forgot2']; ?></p>
	<input type="text" class="forgotfield" name="username" id="username" placeholder="<?php echo $text['username']; ?>"/> <input type="submit" value="<?php echo $text['go']; ?>" />
	<div id="pwdmsg" class="smaller"></div>
</div>
-->

This hides the unwanted text on login.php AND the popup login form after clicking your menu login link.

https://morssweb.com/genealogy/login.php

Note that my site is set to require login AND in my loginlib file I have also pre-filled in a guest login credential, and pre-checked the "stay logged in" box.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...