Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: Owdy - kesäkuu 05, 2004, 03:30:53 IP

Otsikko: Logging out with SSI wont work
Kirjoitti: Owdy - kesäkuu 05, 2004, 03:30:53 IP
<?php ssi_menubar(); ?>
If i try log out from my main site, it takes me to forum and says
LainaaSession verification failed. Please try logging out and back in again, and then try again.
Can i make that work with ssi somehow?
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: [Unknown] - kesäkuu 06, 2004, 07:12:08 AP
Can you give me a test account, please?

-[Unknown]
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: Owdy - kesäkuu 06, 2004, 11:59:42 AP
in your PM
http://www.hoitajat.net
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: [Unknown] - kesäkuu 07, 2004, 12:56:51 AP
The link is:

http://www.hoitajat.net/foorumi/index.php?action=logout;sesc=

Which is wrong.  How are you generating this link?  It should have $context['session_id'].

-[Unknown]
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: Owdy - kesäkuu 07, 2004, 12:59:21 AP
Lainaus käyttäjältä: [Unknown] - kesäkuu 07, 2004, 12:56:51 AP
  How are you generating this link?  It should have $context['session_id'].

With SSI.php ->  <!--#include virtual="./SSI.php?ssi_function=menubar" -->
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: [Unknown] - kesäkuu 07, 2004, 01:01:31 AP
And in the index template's menu sub template, how is the link generated?  With $context['session_id']?

Are you using a customized SSI.php?

-[Unknown]
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: Owdy - kesäkuu 07, 2004, 08:38:48 AP
I have modifyed ssi.php, but not that part.
This is what i use:

<!--#include virtual="./foorumi/SSI.php?ssi_function=menubar" -->

code:

// Display a menu bar, like is displayed at the top of the forum.
function ssi_menubar($output_method = 'echo')
{
global $context;

if ($output_method == 'echo')
template_menu();
// What else could this do?
else
return $context;
}


index.template.php :

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// Show the [home] and [help] buttons.
echo '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '">', ($txt[103]), '</a><br />', $context['menu_separator'], '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?action=help" target="_blank">', ($txt[119]), '</a><br />', $context['menu_separator'];
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?action=admin">', ($txt[2]), '</a><br />', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?action=profile">', ($txt[467]), '</a><br />', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?action=calendar">', ($txt['calendar24']), '</a><br />', $context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?action=login">', ($txt[34]), '</a><br />', $context['menu_separator'], '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?action=register">', ($txt[97]), '</a><br />
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?board=38">Vieraspalsta</a>  <br />
';
}
// Otherwise, they might want to [logout]...
else
echo '
<img src="' . $settings['images_url'] . '/li.gif" alt="" />&nbsp;&nbsp;<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($txt[108]), '</a><br />';

}


edit: updated to latest SSI.php, still no go :(
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: Owdy - kesäkuu 07, 2004, 06:43:13 IP
Hmmm, weird. In php version http://www.hoitajat.net/foorumi/ssi_examples.php it works, but in that .shtml version it wont work. Session id missing :(
This is somekind of bug because it wont work here also  in that shtml version. http://www.simplemachines.org/community/ssi_examples.shtml
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: [Unknown] - kesäkuu 07, 2004, 08:07:01 IP
Wait for the next update, I've changed some things which might fix it.

-[Unknown]
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: Owdy - kesäkuu 08, 2004, 02:51:10 IP
Now its just beautiful and perfect :D Thanks!
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: babylonking - tammikuu 16, 2005, 04:17:01 IP
Lainaus käyttäjältä: Owdy - kesäkuu 05, 2004, 03:30:53 IP
<?php ssi_menubar(); ?>
If i try log out from my main site, it takes me to forum and says
LainaaSession verification failed. Please try logging out and back in again, and then try again.
Can i make that work with ssi somehow?

Having the same problem when i try to logout from my main page. Any fix?

Session verification failed. Please try logging out and back in again, and then try again.
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: nokonium - helmikuu 02, 2005, 01:57:46 IP
I am also getting the same problem reported by some members.
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: [Unknown] - helmikuu 05, 2005, 06:04:31 AP
Are you using it over different subdomains?

-[Unknown]
Otsikko: Re: Logging out with SSI wont work
Kirjoitti: nokonium - helmikuu 05, 2005, 07:39:46 AP
Just re-read
The error some members are getting is the same but I don't think I have any includes.

Not completely sure what is meant by "Are you using it over different subdomains?"

The board has its own domain and all the other issues we had relating to redirected domains etc, like cookie and favicon issues appear OK now, I hope that answers what you were asking.