SearchSearch   ProfileProfile   Log inLog in   RegisterRegister 

Redirect page following failed logon

 
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum
View previous topic :: View next topic  
Author Message
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Mon Jun 15, 2009 2:00 pm    
Post subject: Redirect page following failed logon

Hi,

I would like to redirect users to a JPEG picture following an unsuccessful logon and then back to the logon page (So if someone enters an incorrect password, they get a JPG that says "wrong password, etc. etc. and then 5 seconds later are redirected back to the logon page).

I have the redirect working but cannot find how to change the 'invalid logon' screen

Any help?

Many Thanks
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4420

PostPosted: Tue Jun 16, 2009 11:52 am    
Post subject:

An easier way is to change the "Invalid Login" message directly as it accepts HTML code.

Add the following variable in your custom_lang.php file:

$lang['invalid'] = '<img src="[your image]"/><br/>Invalid login! Please try again';

Refer to chapter 3 -> UI Customization section of firstspot_guide.pdf for more background information on how to change FirstSpot text.
_________________
~ Patronsoft Limited ~
Back to top
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Tue Jul 28, 2009 11:43 am    
Post subject: Error Message

Hi, Just picked this up again having just purchased the full version of firstspot v.6.0.1...

I am getting the following error messages following a standard install whenever a user enters incorrect logon details. I have not yet changed anything.

Warning: Missing argument 3 for GenTable(), called in C:\Program Files\FirstSpot\authserv\fs_login.php on line 522 and defined in C:\Program Files\FirstSpot\authserv\common_functions.php on line 1762

Notice: Undefined variable: scriptStr in C:\Program Files\FirstSpot\authserv\common_functions.php on line 1767
Invalid login! Please try again...


Editing Custom_lang.php causes error messages and editing custom_cmlang.php does nothing!

Any help would be greatly appreciated.

Thanks
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4420

PostPosted: Tue Jul 28, 2009 12:27 pm    
Post subject:

Are you sure you haven't modified FirstSpot php/html at all?

Try to :

1) copy fs_login.php from the original v6.0.1 zip file to FirstSpot\authserv directory

2) copy custom_lang.php from the original v6.0.1 zip file to FirstSpot\usersetting directory

and test again.


Also, note that you need to edit custom_lang.php directly instead of saving this customization in the Configuration Manager UI.
_________________
~ Patronsoft Limited ~
Back to top
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Tue Jul 28, 2009 1:24 pm    
Post subject:

Thanks, By replacing the fs_login.php file I got rid of the error message on redirection following a failed logon attempt.

However when I try to edit custom_lang.php directly using notepad, I insert your text above and get the following error on all clients conecting to the internet via the hotspot:

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\FirstSpot\usersetting\custom_lang.php:2) in C:\Program Files\FirstSpot\authserv\fs_lang.php on line 77


Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\FirstSpot\usersetting\custom_lang.php:2) in C:\Program Files\FirstSpot\authserv\login_select.php on line 106



Replacing custom_lang.php with the original removes this error, but still leaves the basic blue Invalid Login screen that I wish to change to a corporate page.

Thank you for your help
Back to top
chrisli
Forum facilitator


Joined: 23 Nov 2006
Posts: 22

PostPosted: Tue Jul 28, 2009 2:12 pm    
Post subject:

Can you post your custom_lang.php here?
_________________
~ Patronsoft Limited ~
Back to top
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Tue Jul 28, 2009 2:15 pm    
Post subject:

There is nothing in it but the following:


<?



?>
Back to top
chrisli
Forum facilitator


Joined: 23 Nov 2006
Posts: 22

PostPosted: Tue Jul 28, 2009 2:47 pm    
Post subject:

i mean post your custom_lang.php (which insert your customization, not an original one)

here is an example (custom_lang.php)


<?

$lang['invalid'] = '<img src="pic2.jpg"/><br/>Invalid login! Please try again';

?>
_________________
~ Patronsoft Limited ~
Back to top
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Tue Jul 28, 2009 2:52 pm    
Post subject:

Ah!!! Sorry! My bad!

<lang>
Back to top
chrisli
Forum facilitator


Joined: 23 Nov 2006
Posts: 22

PostPosted: Tue Jul 28, 2009 3:21 pm    
Post subject:

if you want to post your code here, you need check the "Disable HTML in this post"
_________________
~ Patronsoft Limited ~
Back to top
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Tue Jul 28, 2009 3:23 pm    
Post subject:

Gotcha.....


<?

$lang['invalid'] = '<img src="C:\Program Files\FirstSpot\authserv\images\unsuccessful_logon.jpg"/><br/>Invalid login! Please try again';

?>
Back to top
chrisli
Forum facilitator


Joined: 23 Nov 2006
Posts: 22

PostPosted: Tue Jul 28, 2009 3:35 pm    
Post subject:

From your code, you need change to

<?

$lang['invalid'] = '<img src="\images\unsuccessful_logon.jpg"/><br/>Invalid login! Please try again';

?>
_________________
~ Patronsoft Limited ~
Back to top
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Tue Jul 28, 2009 4:04 pm    
Post subject:

OK, Thanks, that eliminates the error messages but does not show the desired image upon logon failure?
Back to top
alan
Forum facilitator


Joined: 26 Sep 2003
Posts: 4420

PostPosted: Tue Jul 28, 2009 5:48 pm    
Post subject:

Can you try:

<?

$lang['invalid'] = '<img src="./images/unsuccessful_logon.jpg"/><br/>Invalid login! Please try again';

?>


instead?


BTW, it is a bit easier if you place the jpg within the authserv directory instead.
_________________
~ Patronsoft Limited ~
Back to top
Onions



Joined: 04 Jun 2009
Posts: 14

PostPosted: Wed Jul 29, 2009 8:18 am    
Post subject:

Perfect, Thank you! Works great. Just edited the background JPG to white and we have the server working as we want it.

Thanks again.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    FirstSpot Forum Index -> Pre-sales Support Forum All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group