Last Visit does not work with 2.0.18

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 !

Last Visit does not work with 2.0.18

Postby NeoID on Mon 31. Oct, 2005 11:51

I've download the new phpbb 2.0.18 and tried to apply the last visit mod, but
the code has been changed too much (I guess) so it doesn't work anymore.
Didn't really have any problems with 2.0.17, but since I'm already planning to
reinstall my forum, I would like to use the lastes avaiable. :?
NeoID
Poster
Poster
 
Posts: 11
Joined: Wed 28. Sep, 2005 18:06

Postby Peter77s on Mon 31. Oct, 2005 12:06

I'm having the same problem! Im thinking that it's this MOD becasue this error seems very familiar when I first intalled this mod and was getting errors left and right. turns out that I can log in using firefox only after re freshing the page. IE will not let me in at all

http://www.phpbb.com/phpBB/viewtopic.ph ... 70#1834470
Peter77s
Poster
Poster
 
Posts: 34
Joined: Sat 26. Mar, 2005 19:46

Postby DivErTido on Mon 31. Oct, 2005 12:28

I upgraded my board to 2.0.18 and I have only a lillte problem with this MOD!
In the bottom of my board, the total visits that I have today, is not correct...
In a few hours ago was there 450 in total and now appears 290...

Can someone have a fix for this? :)
DivErTido
Poster
Poster
 
Posts: 35
Joined: Sun 27. Apr, 2003 20:28

Postby Peter77s on Mon 31. Oct, 2005 12:53

I put in my old sessions.php and it's letting me in now. and all seems to be working fine. I guess we will have to wait for the new upgrade.

I was told by a MOD team member in phpbb.com that it is safe to run old code with the new DB. but still.... getting some errors with this MOD.
Peter77s
Poster
Poster
 
Posts: 34
Joined: Sat 26. Mar, 2005 19:46

Postby NeoID on Mon 31. Oct, 2005 13:34

I hope someone could make a new release of the mod. It's great, but I don't really want to downgrade... :?
NeoID
Poster
Poster
 
Posts: 11
Joined: Wed 28. Sep, 2005 18:06

Postby pi on Mon 31. Oct, 2005 16:52

Hello,

i have the same problem, I do that and it seems to be OK, if somebody can look.

Code: Select all
#
#-----[ OPEN ]------------------------------------------------
#
includes/sessions.php

#
#-----[ FIND ]------------------------------------------------
#
if (
{// (
$last_visit = (

$sql = "UPDATE " . USERS_TABLE . "
SET

#
#-----[ IN-LINE FIND ]----------------------------------------
#
if

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//

#
#-----[ IN-LINE FIND ]----------------------------------------
#
{

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//

#
#-----[ IN-LINE FIND ]----------------------------------------
#
user_lastvisit = $last_visit

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_lastlogon = " . time() .  ", user_totallogon=user_totallogon+1

#
#-----[ FIND ]------------------------------------------------
#
$sessiondata['userid'] = $user_id;
}

#
#-----[ IN-LINE FIND ]----------------------------------------
#
}

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//

#
#-----[ FIND ]------------------------------------------------
#
if ( !empty($session_id) )
{

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Last visit MOD
$expiry_time = $current_time - $board_config['session_length'] ;
// End add - Last visit MOD

#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT u.*, s.*
FROM
WHERE
AND

#
#-----[ IN-LINE FIND ]----------------------------------------
#
";

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
AND session_time > $expiry_time

#
#-----[ FIND ]------------------------------------------------
#
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql =
SET

#
#-----[ IN-LINE FIND ]----------------------------------------
#
if

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//

#
#-----[ IN-LINE FIND ]----------------------------------------
#
{

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//

#
#-----[ IN-LINE FIND ]----------------------------------------
#
$thispage_id

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_totalpages = user_totalpages+1, user_totaltime = user_totaltime+($current_time-".$userdata['session_time'].")

#
#-----[ FIND ]------------------------------------------------
#
}

session_clean($userdata['session_id']);

#
#-----[ IN-LINE FIND ]----------------------------------------
#
}

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
//

#
#-----[ FIND ]------------------------------------------------
#
   $sql = 'DELETE FROM ' . SESSIONS_TABLE . '
      WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
      AND session_id <> '$session_id'";

#
#-----[ REPLACE WITH ]--------------------------------
#
   $expiry_time = $current_time - $board_config['session_length'];
   $sql = "DELETE FROM " . SESSIONS_TABLE . "
         WHERE UNIX_TIMESTAMP() - session_time >=172800
         AND session_id <> '$session_id'";

pi
Poster
Poster
 
Posts: 1
Joined: Fri 22. Apr, 2005 17:59
Location: france

Postby inggoody on Wed 02. Nov, 2005 04:44

DivErTido wrote:I upgraded my board to 2.0.18 and I have only a lillte problem with this MOD!
In the bottom of my board, the total visits that I have today, is not correct...
In a few hours ago was there 450 in total and now appears 290...

Can someone have a fix for this? :)


I have the same problem.
Can anyone help?
inggoody
Poster
Poster
 
Posts: 2
Joined: Tue 21. Dec, 2004 16:36

Postby ErnadoO on Wed 02. Nov, 2005 11:55

Have you try this?
ErnadoO
Poster
Poster
 
Posts: 14
Joined: Wed 13. Apr, 2005 22:52
Location: France

Next

Return to Last visit [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron