[2.0.15] Update Session on Page Change MOD

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
5
56%
Very Good
3
33%
Good
1
11%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 9

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27928
Joined: Sat Aug 16, 2003 7:36 am

[2.0.15] Update Session on Page Change MOD

Post by Extensions Robot » Wed Jun 08, 2005 5:21 am

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
Last edited by Extensions Robot on Mon Apr 30, 2007 12:28 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Fri Jun 17, 2005 11:53 am

MOD Validated/Released

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

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Fri Jun 17, 2005 12:22 pm

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!
Last edited by markus_petrux on Fri Jun 17, 2005 7:48 pm, edited 1 time in total.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo » Fri Jun 17, 2005 6:52 pm

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.
I write articles on community building
@ The Infinity Program.

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Fri Jun 17, 2005 7:51 pm

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
Last edited by markus_petrux on Fri Jun 17, 2005 8:13 pm, edited 1 time in total.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

=cipher=
Registered User
Posts: 587
Joined: Sat Feb 12, 2005 9:15 pm
Location: A Network Near You
Contact:

Post by =cipher= » Fri Jun 17, 2005 8:05 pm

Great MOD markus! :D
Best Regards:
Aaron McGowan / =cipher=

Status: Coding / Programming
Head Programmer for The Tech Base
Junior Programmer for Triplentry Solutions

User avatar
badboy4ever
Registered User
Posts: 177
Joined: Sat Jun 11, 2005 2:38 pm
Location: UK

Post by badboy4ever » Fri Sep 16, 2005 3:29 pm

There aint been reply's for mounths do you still offer support?

Image

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Fri Sep 16, 2005 3:44 pm

Maybe because no one installed this MOD or those who did it had no problem.


:?:
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

User avatar
badboy4ever
Registered User
Posts: 177
Joined: Sat Jun 11, 2005 2:38 pm
Location: UK

Post by badboy4ever » Fri Sep 16, 2005 3:45 pm

Okay then I installed on 2.0.17 with no problems.

Image

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Fri Sep 16, 2005 3:57 pm

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. ;)
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

User avatar
badboy4ever
Registered User
Posts: 177
Joined: Sat Jun 11, 2005 2:38 pm
Location: UK

Post by badboy4ever » Fri Sep 16, 2005 6:54 pm

Oh yeah and so everyone knows I already have like 20 mod's on my board so it works on a havily modded board.

Image

Capmaster
Registered User
Posts: 69
Joined: Tue Jul 05, 2005 1:26 pm

Post by Capmaster » Sat Oct 01, 2005 7:54 pm

Sessions updates (lack of) has been a pet peeve of mine. Thanks for this handy mod!! Nice work :wink:
Image
Some mornings, it's just not worth chewing through the leather straps

User avatar
badboy4ever
Registered User
Posts: 177
Joined: Sat Jun 11, 2005 2:38 pm
Location: UK

Post by badboy4ever » Sun Nov 13, 2005 9:07 pm

Hmm phpbb 2.0.18 has been realeased dose it work with that?

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

Image

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Post by GoBieN » Sun Apr 09, 2006 7:15 pm

Works fine on 2.0.20 with Easymod

User avatar
nico66s
Registered User
Posts: 132
Joined: Tue Nov 15, 2005 5:41 pm
Location: Padova, Italy
Contact:

Post by nico66s » Sun Jul 02, 2006 6:50 pm

Is there a way to log this?
Like a report of the activity for every session, as in Advanced IP toolkit

Post Reply

Return to “[2.0.x] MOD Database Cleanup”