PDA

View Full Version : What is "clear session"?


JJR512
10-31-2001, 12:08 AM
On the forums home page, down near the "mark all forums read" link, there is another link to clear the session. What does this do, what is its purpose?

MrLister
10-31-2001, 12:45 AM
all it does is clear your cookies..

JJR512
10-31-2001, 12:49 AM
I thought mark all forums read also cleared your cookies. But clearing sessions does not mark any forums as read, so I guess that is the difference. But why would someone want to clear the cookies...I mean what is the practical purpose of it?

MrLister
10-31-2001, 01:09 AM
it doesn't seem to work very well.... i still have unread stuff after i click on it.

Bane
10-31-2001, 01:43 AM
It clears you from whos online. FireFly covered this in his announcement I think?

MrLister
10-31-2001, 01:55 AM
oh i see.... still i don't quite get what's the point?

eva2000
10-31-2001, 10:58 AM
Originally posted by Bane
It clears you from whos online. FireFly covered this in his announcement I think? the announcement was too long to read :o

Admin
10-31-2001, 01:14 PM
[QUOTE]Originally posted by eva2000
the announcement was too long to read :o

eva2000
10-31-2001, 01:27 PM
Originally posted by FireFly

Look who's talking Mr. I Have To Have A Long Signature. :D

And yes Bane is right.
I dunno, I actually like this one? :( :o

MrLister
10-31-2001, 01:32 PM
Originally posted by eva2000
the announcement was too long to read :o
:) ditto... i dosed off after the 3rd line..

Admin
10-31-2001, 01:39 PM
[QUOTE]Originally posted by MrLister
:) ditto... i dosed off after the 3rd line..

eva2000
10-31-2001, 01:40 PM
Originally posted by FireFly

LMAO :china:

Sorry :o needs formatting... structure and lots of bullet point notes to keep us glued to the message ;)

SWFans.net
11-02-2001, 07:43 PM
I like the Clear Session feature and wonder if Firefly would share with us how its done?

Admin
11-02-2001, 07:51 PM
Add this action to member.php:
// ############################### start clear sessions ###############################
if ($action=="clears") {
include("./global.php");
if ($bbuserinfo[userid]!=0 and $bbuserinfo[userid]!=-1) {
$DB_site->query("UPDATE user SET lastactivity='".(time()-$cookietimeout)."',lastvisit='".time()."' WHERE userid='$bbuserinfo[userid]'");
}
$DB_site->query("DELETE FROM session WHERE sessionhash='".addslashes($session[dbsessionhash])."'");
$DB_site->query("DELETE FROM session WHERE userid='$bbuserinfo[userid]'");
eval("standarderror(\"".gettemplate("error_sessionclear")."\");");
}
and link to member.php?s=$session[sessionhash]&action=clears
Add a template named error_sessionclear and put your message there.

SWFans.net
11-02-2001, 08:03 PM
Thank ya. :pleased:

JJR512
11-02-2001, 11:53 PM
And all this does--the only thing at all--is remove you from the Who's Online? It doesn't mark anything as read, it doesn't log you out, it doesn't do anything else, other than take you off Who's Online?

I'm still not sure if I see what the point is. If someone can explain it to me a little better so that I can explain it to my members so we'll all know what to do with it, I'd really appreciate it.

Palmer ofShinra
11-03-2001, 03:40 AM
It does not log you out, which would clear your cookie and prevent an auto-login next time.

It does remove you from Who's Online.

Why? Because if you leave the site, you show up on Who's Online for 15 minutes after your last activity.

It's just if you don't want to show up on Who's Online without actually logging out.

Admin
11-03-2001, 06:45 AM
And it does mark all forums read.
If you don't want that, remove this code from the code above:
if ($bbuserinfo[userid]!=0 and $bbuserinfo[userid]!=-1) {
$DB_site->query("UPDATE user SET lastactivity='".(time()-$cookietimeout)."',lastvisit='".time()."' WHERE userid='$bbuserinfo[userid]'");
}

SirSteve
01-13-2002, 02:45 PM
Well, this works but it still shows the user as ONLINE in their Profile and in the CURRENTLY ACTIVE user list.