News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Same Simple Code, Different Results Between IE and Opera

Started by kanon, January 08, 2006, 04:05:35 PM

Previous topic - Next topic

kanon

Hi, I've just installed SMF on my server and think it's really great. I've just begun integrating it with the current website:

hxxp:www.herbaloutfitters.com/pbw/smf/ [nonactive]

This website is basically another bulletin board system except that it has advanced features for online roleplaying games (play-by-post). (ASIDE: For all you RPGers out there, check out the live site at hxxp:www.playbyweb.com [nonactive]. Many good games going! hxxp:www.herbaloutfitters.com/pbw/smf/ [nonactive] is just a test site.)

I'm planning to replace my current user database table with SMF's, but I haven't even gotten there yet. Pretty much all I've done is add the ssi_login() and ssi_logout() functions to the home page.

It all works fine in Internet Explorer, but Opera does something weird.

Here's what happens:

I login using the form ssi_login() puts on my home page, which I've set to redirect back to the home page, not SMF.

Then, I click a link I have to SMF to get to the SMF home page. (Called "New! Forum")

Then, I type the url for my home page in the url box.

If I have the final slash on the url, it works correctly.

If I don't, I'm logged out, as the following print_r($context) show:


  • hxxp:www.herbaloutfitters.com/pbw/smf [nonactive] (no final slash): [user] => Array ( [id] => 0 [is_logged] => [is_guest] => 1 ...
  • hxxp:www.herbaloutfitters.com/pbw/smf/ [nonactive] (with final slash): [user] => Array ( [id] => 2 [is_logged] => 1 [is_guest] => ...

What can I do to fix this?

I'm going to go through all the urls in my code to make sure the slash is there, but sometimes users might type in urls by hand, often leaving off the final slash. How can I prevent this from logging them out?

If anyone wants to see this phenomenon for themselves. You can use login: "testguy", pw: "test", but you have to use Opera. I have version 8.51. It's fine in IE. (Haven't tried Netscape.)

Advertisement: