Firefox PHP

Login on landing page?

Posted by korsakov 
Login on landing page?
March 04, 2010 03:24PM
Wouldn't it be more convenient to login to Phorum right from the landing page? Are there any disadvantages pursuing this goal? Thank you!
Re: Login on landing page?
March 04, 2010 03:41PM
what is "the landing page"?
what is your goal? have some ajax login or what?


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Login on landing page?
March 04, 2010 04:27PM
Oh, I meant the header page. My goal is to spare the user going to another page in order to log in. Thank you.
Re: Login on landing page?
March 04, 2010 09:51PM
Quote
korsakov
Oh, I meant the header page. My goal is to spare the user going to another page in order to log in. Thank you.


I did it with a template hack.

Put this as the very first line of your header.tpl file....

<?php ob_start() ?>

... and then take the important form code from the login.tpl file and place it in your header.tpl file (or footer perhaps) and customize it to make it work for you. Use the {IF NOTLOGGEDIN} code to make it so that it appears to not logged in users, but then does not appear if logged in.


Robert Angle
Phorum lover, nothing more.
Ruminations
Re: Login on landing page?
March 04, 2010 09:59PM
Great, Robert! I will try this. Thank you!
Re: Login on landing page?
March 05, 2010 07:23AM
You just want the form there? That can be done, sure. Just template work. Don't know how efficient it is. You just have to set that damn cookie on every page. I hate that cookie. Why did I put that in there? Makes logging in hard and stuff.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Login on landing page?
March 05, 2010 07:36AM
Quote
Brian Moon
You just want the form there? That can be done, sure. Just template work. Don't know how efficient it is. You just have to set that damn cookie on every page. I hate that cookie. Why did I put that in there? Makes logging in hard and stuff.

Was putting the login form in the header bad advice?

Since my forum is blocked to the public, I actually put my login form in the message.tpl file, since it gets called on the index page when a user is not logged in. I'm not sure if it ever gets called any other time, but I do have the code with {IF NOTLOGGEDIN} tags.

The php bit is at the beginning of the header page though.


Robert Angle
Phorum lover, nothing more.
Ruminations
Re: Login on landing page?
March 05, 2010 12:35PM
You know why you put that there: to check if the user's browser supports and accepts cookies, before trying to keep a session alive using the Phorum session cookie.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login