Page 1 of 2

[2.0.15] Update Session on Page Change MOD

Posted: Wed Jun 08, 2005 5:21 am
by Extensions Robot
MOD Name: Update Session on Page Change MOD
Author: markus_petrux
MOD Description: This MOD modifies the phpBB session management so it updates the user session information on page changes (so we get up to date info for viewonline).
Note: By default, session information is only updated after 60 seconds.


MOD Version: 1.0.0

Download File: update_session_on_page_change_1_0_0.zip
mods overview page: View
File Size: 1021 Bytes

Security Score: 0

Posted: Fri Jun 17, 2005 11:53 am
by ycl6
MOD Validated/Released

Notes:
This MOD immediately updates the Who is Online's Forum Location when user go to a new location.

Posted: Fri Jun 17, 2005 12:22 pm
by markus_petrux
Thanks a lot to all phpBB MODs Team members for your hard work.

~~~~~~~~~~

Space reserved for future comments regarding this MOD.

~~~~~~~~~~

We could perhaps describe what this MOD does by using a bit of "pseudocode":

This would be standard phpBB behaviour when checking the user session:

IF session not updated in 60 seconds THEN
  1. Update session information in sessions table.
  2. Update session time and current page in users table.
  3. Delete expired sessions.
  4. Update session time in cookies.
ENDIF

Note the user session is updated only after 60 seconds of last update time. During this 60 seconds interval, the user might be jumping from page to page, from forum to forum, and this information gets simply lost.

This MOD solves this "situation" by adding a simple condition to the IF expression:

IF session not updated in 60 seconds OR user changed page THEN
  1. Update session information in sessions table.
  2. Update session time and current page in users table.
  3. Delete expired sessions.
  4. Update session time in cookies.
ENDIF

Therefore, we can get more accurate information when browsing the Who's Online report or the ACP Index page.

Quite simple, really.

~~~~~~~~~~

Enjoy!

Posted: Fri Jun 17, 2005 6:52 pm
by onigumo
Will this cause any noticable slowdown or be more costly in bandwith, and if so, significantly?

I'm guessing that the later question may display my ignorance towards the consumption of bandwith or whatever, but I seek to dispel this ignorance, if one would be so kind to point it out, if it exists.

Posted: Fri Jun 17, 2005 7:51 pm
by markus_petrux
Hi!

I have updated my previous post. I hope it helps to see how this MOD works.

There wouldn't be more bandwidth involved here, just more DB updates to reflect more accurate session information.


Cheers

Posted: Fri Jun 17, 2005 8:05 pm
by =cipher=
Great MOD markus! :D

Posted: Fri Sep 16, 2005 3:29 pm
by badboy4ever
There aint been reply's for mounths do you still offer support?

Posted: Fri Sep 16, 2005 3:44 pm
by markus_petrux
Maybe because no one installed this MOD or those who did it had no problem.


:?:

Posted: Fri Sep 16, 2005 3:45 pm
by badboy4ever
Okay then I installed on 2.0.17 with no problems.

Posted: Fri Sep 16, 2005 3:57 pm
by markus_petrux
IIRC, in the MOD Author Notes section of the MOD Header tells it was tested with 2.0.15, but it's because that was the current phpBB version.

It's good to know it still works. ;)

Posted: Fri Sep 16, 2005 6:54 pm
by badboy4ever
Oh yeah and so everyone knows I already have like 20 mod's on my board so it works on a havily modded board.

Posted: Sat Oct 01, 2005 7:54 pm
by Capmaster
Sessions updates (lack of) has been a pet peeve of mine. Thanks for this handy mod!! Nice work :wink:

Posted: Sun Nov 13, 2005 9:07 pm
by badboy4ever
Hmm phpbb 2.0.18 has been realeased dose it work with that?

(I restarted my board becuase there were some errors and that)

Posted: Sun Apr 09, 2006 7:15 pm
by GoBieN
Works fine on 2.0.20 with Easymod

Posted: Sun Jul 02, 2006 6:50 pm
by nico66s
Is there a way to log this?
Like a report of the activity for every session, as in Advanced IP toolkit