Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: MrsAngelD on January 03, 2006, 03:44:49 AM

Title: Can't make the login redirect work have been searching all night!
Post by: MrsAngelD on January 03, 2006, 03:44:49 AM
Ok i'v been searching all night and trying everything I can to redirect my login for my site.

at the very top of my page I have

require ("forums/ssi.php");

and for the login I have

<?php $current_url $_SERVER['PHP_SELF']; ssi_login($current_url); ssi_logout($current_url);  ?>

this won't work I have no Idea why it just keeps sending me to the forums

Any Ideas?

thanks in advance,
Angel

smf rc1
Title: Re: Can't make the login redirect work have been searching all night!
Post by: Orstio on January 03, 2006, 06:57:57 AM
Do this:

<?php echo $_SERVER['PHP_SELF']; ?>

And I think you'll see why...
Title: Re: Can't make the login redirect work have been searching all night!
Post by: MrsAngelD on January 03, 2006, 07:03:29 AM
Ok basically that tells me nothing I guess I forgot to mention I'm a php noob I was only following instructions I found in another post. So then since apparently none of the other posts instructions are working for me what can I do? I have no Idea how to make the login redirect back to the page they log in from.

t.y.i.a
Angel
Title: Re: Can't make the login redirect work have been searching all night!
Post by: Orstio on January 03, 2006, 07:14:14 AM
$_SERVER['PHP_SELF'] does not contain the URL.  If you were in SMF, <? echo $_SERVER['PHP_SELF']; ?> will return "index.php", not "http://yoursite.com/folder/index.php".
Title: Re: Can't make the login redirect work have been searching all night!
Post by: MrsAngelD on January 03, 2006, 07:53:33 AM
Thanks for helping me oristo,  :D.

So what should I do then, how do I make it work?
Title: Re: Can't make the login redirect work have been searching all night!
Post by: MrsAngelD on February 17, 2006, 05:16:33 PM
Anybody? I searched and searched and I can't make this work, so any help would be greatly appreciated.
Title: Re: Can't make the login redirect work have been searching all night!
Post by: Orstio on February 18, 2006, 09:57:51 AM
(You are going to have to do some work yourself....)

http://ca3.php.net/manual/en/reserved.variables.php#reserved.variables.server

Try HTTP_HOST.
Title: Re: Can't make the login redirect work have been searching all night!
Post by: orville_Elf on February 21, 2006, 06:18:25 AM
:( sad, bad thread.
Title: Re: Can't make the login redirect work have been searching all night!
Post by: Daniel15 on February 25, 2006, 10:38:21 PM
I've got something similar to this on my site at http://www.stickboarder.be/ . I've changed the code below to make it more generic. This should work for you:

<?php
require (
"forums/ssi.php");
global $context;

ssi_welcome();
if ($context['user']['is_guest']) {
ssi_login("http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
} else {
echo " ";
ssi_logout("http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
echo "<br><br>";
}

echo "Online: ";
ssi_logOnline();
$stats ssi_boardStats("array");
echo "<br><br><br><b><center>Forum Statistics</center></b><br>
      <i>Members:</i> 
{$stats['members']}<br>
  <i>Topics:</i> 
{$stats['topics']}<br>
  <i>Posts:</i> 
{$stats['posts']}";
?>


You'll probably want to omit the stats at the bottom, but the general idea is there.
Title: Re: Can't make the login redirect work have been searching all night!
Post by: otario on February 26, 2006, 01:45:50 PM
I think is near impossible I tried everything and nothing worked.  :(

http://www.hammergames.net/
Title: Re: Can't make the login redirect work have been searching all night!
Post by: orville_Elf on March 25, 2006, 10:23:15 AM
Tried to look at your site, (@t 25 march 06), but it says "ACCOUNT SUSPENDED contact billing department"

Just a hunch, but  I think that may cause 'login issues'.  :-[