|
| Author |
Message |
~HG~
Joined: 25 Sep 2005
Posts: 423
Location: Australia
|
Posted: 2/4/2006, 2:33 pm Post subject: |
|
|
I have changed Users to Members where appropiate and Guest to Lurkers in my language file
I really think the name Users is a misnomer. _________________ ~HG~
|| Click here to view all my phpBB Communities || |
|
| Back to top |
|
 |
~HG~
Joined: 25 Sep 2005
Posts: 423
Location: Australia
|
Posted: 2/4/2006, 3:36 pm Post subject: |
|
|
Since installing this mod I have found that by not including the edits to sessions.php the information in view profile is not updated but rather it just keeps extending the time of 1 visit so I guess the edits are necessary to fix this but how???
That is the question!!! _________________ ~HG~
|| Click here to view all my phpBB Communities || |
|
| Back to top |
|
 |
Nick
Joined: 09 Sep 2005
Posts: 775
Location: Next to the stereo
|
|
| Back to top |
|
 |
Nick
Joined: 09 Sep 2005
Posts: 775
Location: Next to the stereo
|
Posted: 2/5/2006, 10:15 am Post subject: |
|
|
OK, I got it so that everything works except the part involving $thispage_id in sessions.php - had to delete that command. Unfortunately, I guess it won't update the session time and page hits now... _________________ [The Smash Syndicate] Ek Pyros - Out of Fire |
|
| Back to top |
|
 |
Nick
Joined: 09 Sep 2005
Posts: 775
Location: Next to the stereo
|
Posted: 2/5/2006, 9:01 pm Post subject: |
|
|
| Code: |
| , user_totalpages = user_totalpages+1, user_totaltime = user_totaltime+($current_time-".$userdata['session_time'].") |
That's what you put after the $thispage_id command line. It works completely for me now. _________________ [The Smash Syndicate] Ek Pyros - Out of Fire |
|
| Back to top |
|
 |
~HG~
Joined: 25 Sep 2005
Posts: 423
Location: Australia
|
Posted: 2/5/2006, 11:08 pm Post subject: |
|
|
I am not sure that the edits to sessions.php are even required since the upgrades that have taken place bearing in mind that this mod was written for 2.0.6
Mine seems to work without the edits but then again, at midnight every night, or thereabouts, it reverts back to the start again and I am not sure that is supposed to happen.
I will try again to edit the sessions .php and at the same time rewrite the install instructions in the mod so that the edits end up in the correct place when I decide to put it on my other sites. _________________ ~HG~
|| Click here to view all my phpBB Communities || |
|
| Back to top |
|
 |
Nick
Joined: 09 Sep 2005
Posts: 775
Location: Next to the stereo
|
|
| Back to top |
|
 |
~HG~
Joined: 25 Sep 2005
Posts: 423
Location: Australia
|
Posted: 2/7/2006, 3:28 pm Post subject: |
|
|
I have rewritten the sessions.php edits in the mod so if someone could take the time to check that this is all correct I would appreciate it. I appear to have an error in my current sessions.php which I have to check later so I can really test it.
| Code: |
#-----[ OPEN ]------------------------------------------------
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------------
#
if ( $user_id != ANONYMOUS )
{
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
#
#-----[ REPLACE WITH ]----------------------------------------
#
//if ( $user_id != ANONYMOUS )
//{
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
#
#-----[ FIND ]----------------------------------------
#
if (!$admin)
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit
WHERE user_id = $user_id";
#
#-----[ REPLACE WITH ]----------------------------------
#
if (!$admin)
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit, user_lastlogon = " . time() . ", user_totallogon=user_totallogon+1
WHERE user_id = $user_id";
#
#-----[ FIND ]------------------------------------------------
#
$sessiondata['userid'] = $user_id;
}
#
#-----[ REPLACE WITH ]----------------------------------------
#
$sessiondata['userid'] = $user_id;
//}
#
#-----[ FIND ]------------------------------------------------
#
//
// Does a session exist?
//
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 " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
WHERE s.session_id = '$session_id'
AND u.user_id = s.session_user_id";
#
#-----[ REPLACE WITH ]----------------------------------------
#
$sql = "SELECT u.*, s.*
FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
WHERE s.session_id = '$session_id'
AND u.user_id = s.session_user_id AND session_time > $expiry_time";
#
#-----[ FIND ]------------------------------------------------
#
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time,
#
#-----[ REPLACE WITH ]----------------------------------------
#
//if ( $userdata['user_id'] != ANONYMOUS )
//{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time,
#
#-----[ IN-LINE FIND ]----------------------------------------
#
$thispage_id
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_totalpages = user_totalpages+1, user_totaltime = user_totaltime+($current_time-".$userdata['session_time'].")
#
#-----[ FIND ]------------------------------------------------
#
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ REPLACE WITH ]----------------------------------------
#
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
//}
#
#-----[ FIND ]--------------------------------
#
//
// Delete expired sessions
//
$sql = 'DELETE FROM ' . SESSIONS_TABLE . '
WHERE session_time < ' . (time() - (int) $board_config['session_length']) . "
AND session_id <> '$session_id'";
#
#-----[ REPLACE WITH ]----------------------------------------
#
//
// Delete expired sessions
//
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE UNIX_TIMESTAMP() - session_time >=172800
AND session_id <> '$session_id'";
# |
_________________ ~HG~
|| Click here to view all my phpBB Communities || |
|
| Back to top |
|
 |
~HG~
Joined: 25 Sep 2005
Posts: 423
Location: Australia
|
Posted: 2/19/2006, 2:40 pm Post subject: |
|
|
I replaced my sessions.php with a copy that I got from nick however, it works on one forum but not on another.
My sessions.php is posted above.
I am currently running the mod without the edits to sessions and as a result it shows some members, such as a newbie who joined about 12 hours ago as being online for 36 plus years in their profile yet in the memberlist it shows that have never visited.
It also does not update the record number of users online which still shows as 114 on 24th Dec 2004 yet I have seen more than 130 online with this mod installed.
Can someone take the time to look at the mod in general and my sessions.php in particular to see if they can sort this problem out thanks. _________________ ~HG~
|| Click here to view all my phpBB Communities ||
Last edited by ~HG~ on 2/19/2006, 3:08 pm; edited 1 time in total |
|
| Back to top |
|
 |
~HG~
Joined: 25 Sep 2005
Posts: 423
Location: Australia
|
Posted: 2/19/2006, 2:42 pm Post subject: |
|
|
I have just noticed a similar problem exists on this forum as well as it shows that Most users ever online was 41 on Sat 31 Dec, 2005 yet the current online information is showing 71 _________________ ~HG~
|| Click here to view all my phpBB Communities || |
|
| Back to top |
|
 |
|