Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Another SSI Question

Aloittaja Scferg, tammikuu 19, 2008, 12:11:44 AP

« edellinen - seuraava »

Scferg

Okay, now that I have my other SSI question dealt with...I have yet another. I have the <?php ssi_login(); ?> and <?php ssi_logout(); ?> on my external homepage. But, when a user signs in with the login forum, or click "logout" (if they are already logged in), it takes them to my SMF index. Is there a way to log them in/ out but keep them on my homepage, instead of taking them to my forum?

Angelotus

yes there is. You can change this in the sources/loginout.php file.

For changing to homepage when logging in:

search for
// Some whitelisting for login_url...
if (empty($_SESSION['login_url']))
redirectexit($scripturl . '?action=profile');


(I have action=profile, because I want them to redirect to their profile when logging in).

replace for something like:
// Some whitelisting for login_url...
if (empty($_SESSION['login_url']))
redirectexit('http://myhomepage.com');


Or use the above and change the action 'profile' for something else, like forum or arcade or something ;D

And for logging out the session logout url must be set, but I don't now where...

Scferg

So if I do this, and use the second code you provided me...even when the users login on the forum, it will take them to my homepage? I just want them to stay on my homepage when they login from it.

Scferg

Well, I tried it, but it redirects users to my homepage even if they login from the forum...

Angelotus

maybe this will suite you? I haven't tried it yet, but I think this is what you need:
http://www.simplemachines.org/community/index.php?topic=13016.msg819454#msg819454

Advertisement: