Help: Adding $_SESSION['login_url'] $_SESSION['logout_url'] for SMF2.0 Bate3.1

Started by wjhdiz, June 21, 2008, 05:30:25 AM

Previous topic - Next topic

wjhdiz

Hi,

For SMF1.4, putting this on the home page and add

        $_SESSION['login_url']=$scripturl;
        $_SESSION['logout_url']=$scripturl;

in boardindex_template.php works. I am having a problem doing this for SMF2.0 Beta3.1.

Any suggestions are greatly appreciated.

Thanks.
Jimmy
Freedom of speech? It is freer if not speaking out.
Believing in God? Yes, talk with God every day through God creations.
Coding is poem and a way of keeping away from the troubled world.

metallica48423

these variables are the same in 2.0.  It should be the same process.

What are you trying to accomplish?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

wjhdiz

I made a simple front (call home page) that has some static content. With SSI.php, I added some content, like recentTopic, etc. to the front page. Members can login or logout from front page and when members logout, it will bring them to front page instead of home page of forum.

Hope this is clear enough and I have use what was said in the message in SMF1.4 and 1.5. On SMF2.0 beta3.x, it looks to me that Boardindex.template.php is a bit different then SMF1.x. Does the variable $_SESSION still exist?

Thanks.
Jimmy
Freedom of speech? It is freer if not speaking out.
Believing in God? Yes, talk with God every day through God creations.
Coding is poem and a way of keeping away from the troubled world.

metallica48423

$_SESSION is a PHP superglobal -- however the particular ones you mention are still valid though i'm not entirely sure why you'd edit BoardIndex.template.php?

The variables need to be set on the php script where they're logging in from -- are you including the header and thus the quick login form on the SSI page?  how do you have that set up?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Advertisement: