[MOD-DB] Update Session on Page Change MOD v1.0.0
 
 
Post new topic   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> Update Session on Page Change
View previous topic :: View next topic  
Author Message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Wed Jun 08, 2005 5:26 am    Post subject: [MOD-DB] Update Session on Page Change MOD v1.0.0 Reply with quote

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note:
This MOD has been kindly approved by the phpBB MOD Team Smile

Check out its Release Announcement topic:
http://www.phpbb.com/phpBB/viewtopic.php?t=296737
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


MOD Title: Update Session on Page Change MOD

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:
http://www.phpmix.org/projects


How it works?

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.


MOD Header:

Code:
##############################################################
## MOD Title: Update Session on Page Change MOD
## MOD Author: markus_petrux < nospam@phpmix.com > (Markus) http://www.phpmix.com
## 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
##
## Installation Level: (Easy)
## Installation Time: 1 Minute
## Files To Edit: 1
##    includes/sessions.php
## Included Files: 0
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## - MOD related comments:
##   Tested with phpBB 2.0.15
##   This MOD is EasyMOD friendly.
##
##############################################################
## MOD History:
##
## 2005/01/31 - 1.0.0
## - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Fri Jun 17, 2005 1:11 pm    Post subject: Re: [MOD-DB] Update Session on Page Change MOD v1.0.0 Reply with quote

This MOD has been kindly approved by the phpBB MOD Team. Smile

Check out its Release Announcement topic:
http://www.phpbb.com/phpBB/viewtopic.php?t=296737

Download:
Please use the phpBB MODs Database (Add-On's category).

Support, feeback, suggestions:
Feel free to use this forum, here at phpMiX.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Fri Jun 17, 2005 9:00 pm    Post subject: Re: [MOD-DB] Update Session on Page Change MOD v1.0.0 Reply with quote

Updated topic starter. Added the "How it works" section.


Hope that helps Wink

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> phpBB MODs -> Update Session on Page Change All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum