mariovaldez.net

MV.net forums
It is currently 14 Jul 2016, 00:47

All times are UTC - 7 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: log-out?
PostPosted: 21 Aug 2004, 14:15 
Hello! I just installed this script on my website and I love it! Thank you! I had tried three others and couldn't get them to work - I didn't have any problems with this, and I have zero php knowledge.

Anyways, I have a quick question for you - How long will someone stay logged in? Is there a way to change the log in time frame or a way for them to log out?

Oh, I'm also wondering if there's a way to make the "incorrect password" message display inside a table rather than at the top of the page?

Thanks a bunch!
Joy


Report this post
Top
  
Reply with quote  
 Post subject: Logging out.
PostPosted: 21 Aug 2004, 17:13 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
Joy:

> Hello! I just installed this script on my
> website and I love it! Thank you! I had
> tried three others and couldn't get them
> to work - I didn't have any problems with
> this, and I have zero php knowledge.

Nice to hear that!


> Anyways, I have a quick question for you
> - How long will someone stay logged in?
> Is there a way to change the log in time
> frame or a way for them to log out?

Ah. I think I didn't documented that. :oops:

You can create a link anywhere like this:
Code:
To logout click here: <a href="<?php echo $slogin_php_self."?logout=1" ?>">logout</a>.


You can put it in the header or footer section, so it will be available on every page. That code will create a link which URL is the current page with a "?logout=1" appended. So, if you don't want to write PHP code, you can also use something like:
Code:
To logout click here: <a href="index.php?logout=1">logout</a>.



> Oh, I'm also wondering if there's a way to
> make the "incorrect password" message
> display inside a table rather than at the
> top of the page?

Well, as the verification is done in the included slogin_lib.inc.php file, it will appear always at top of the page. If you want it to appear below the login box, you can open the slogin_lib.inc.php file, around line 138 there is this:
Code:
include_once ("header.inc.php");
echo "<div align=\"center\">{$slogin_text[$slogin_lang]["WrongLogin"]}</div>";
include_once ("slogin.inc.php");
include_once ("footer.inc.php");

Change it to this:
Code:
include_once ("header.inc.php");
include_once ("slogin.inc.php");
echo "<div align=\"center\">{$slogin_text[$slogin_lang]["WrongLogin"]}</div>";
include_once ("footer.inc.php");

Which is the mostly the same, we just switched the position of the slogin.inc.php file inclusion and now the message would appear after the login box.

If you want to change the code to suit your look and feel, you can edit the line:
Code:
echo "<div align=\"center\">{$slogin_text[$slogin_lang]["WrongLogin"]}</div>";

To use something like
Code:
echo "<table align=\"center\"><tr><td>{$slogin_text[$slogin_lang]["WrongLogin"]}</td></tr></table>";

Just be carefull with the quotes in the HTML code, you should use \" (backslash+quote).
Or better yet, if you are using Cascade Style Sheets (CSS) you can then modify the look and feel on the CSS file and just modify the PHP code to use a CSS class:
Code:
echo "<div class=\"warningbox\">{$slogin_text[$slogin_lang]["WrongLogin"]}</div>";



Hope this helps you, Joy.

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: thanks!
PostPosted: 23 Aug 2004, 14:26 
thank you very much! that worked!


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group