MOD download & history

This mod will register when the user last logged in, allong with the info about how meny users have visited the board

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Postby hakuna matata on Tue 11. Jun, 2002 12:12

yeep, two days ago i got it solved...

the thing was that i was removing some lines of code which should have stayed in session.php, now it works :)
hakuna matata
Poster
Poster
 
Posts: 2
Joined: Wed 15. May, 2002 18:17

Postby ralphlei on Sun 23. Jun, 2002 07:02

Niels wrote:I have updated the part 1 to 1.1.19, fixed (I think) that guests are reset once a while

in file session.php
[FIND]
$dato=date('Hi',time();

[REPLACE WITH]
$dato= sprintf('%04d',date('Hi',time()));


where is this part in session.php?

and i am still experiencing the reset problem for guests :( ONLY if i logged in...weird...

site: [url]test.myoldfriends.com/testforum/index.php[/url]
ralphlei
Poster
Poster
 
Posts: 83
Joined: Mon 12. Aug, 2002 22:52

Postby MJ on Wed 26. Jun, 2002 20:53

I can't find that new bit for 1.0.19 in sessions.php either

Any ideas????? Oh 2.0.1 too!!!
MJ
Poster
Poster
 
Posts: 90
Joined: Fri 19. Apr, 2002 13:46

Postby MJ on Wed 26. Jun, 2002 21:00

Nevermind I found it........near this!

// Delete expired sessions
//


You may have had this if you didn't update to 1.0.18:

$dato=create_date('Hi', time(),$board_config['board_timezone']);
MJ
Poster
Poster
 
Posts: 90
Joined: Fri 19. Apr, 2002 13:46

Postby Mr.Chung on Tue 02. Jul, 2002 08:36

Its great mod, thank you :D
Mr.Chung
Poster
Poster
 
Posts: 3
Joined: Tue 02. Jul, 2002 08:31

Postby Niels on Fri 30. Aug, 2002 23:08

I have now updated the how-to to version 1.2.1.

I had missed a comma in the session.php, causing a error to display when user login

here are how to correct this
in stead of this

Code: Select all
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
user_lastlogon = " . time() .  "


should have been
#
Code: Select all
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_lastlogon = " . time() .  "
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Tue 10. Sep, 2002 20:50

I have now updated the how-to to version 1.2.2.
fixing that guest users was counted wrong if mixed timezones

here are how to upgrade to 1.2.2.
in index.php
Code: Select all
[FIND]
$sql = 'SELECT session_ip, MAX(session_time) as session_time FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" GROUP BY session_ip';

[REPLACE WITH]
$sql = 'SELECT session_ip, MAX(session_time) as session_time FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" AND session_time >= '.$timetoday.' AND session_time< '.($timetoday+86399).' GROUP BY session_ip';



in session.php
Code: Select all
[FIND AND DELETE]
$dato= sprintf('%04d',date('Hi',time()));
$timetoday = time() - (3600*($dato[0].$dato[1])) - (60*($dato[2].$dato[3]));

[FIND]
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_time < $timetoday-172800

#
#-----[ IN-LINE FIND ]------------------------------------------
#
session_time < $timetoday-172800
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
UNIX_TIMESTAMP() - session_time >=172800
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Thu 12. Sep, 2002 22:12

I have now included a part 4, of my last visit mod, this will add extra information to the users profile about how meny hours a given user have spend on the board
These 3 extra info is added:

Total time spend
Time spend last time
Number of visits

they will only be visible for moderators / admin to awoid users think they are being watched to mutch
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

PreviousNext

Return to Last visit [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 0 guests

cron