last visit mod + UPI2D problem beim einbau

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 mod + UPI2D problem beim einbau

Postby Stone on Mon 08. Aug, 2005 15:02

hallo.

ich hab in meinem forum (2.0.16) den UPI2D mod eingebaut und bin gerade dabei den last visit mod einzubauen.

mein problem dabei ist jetzt das der UPI2D mod code teile verändert hat die ich laut dem last visit mod ändern soll und jetzt weiss ich nicht wie ich das ganze ändern soll bzw. ob ich es überhaupt ändern soll.

die probleme liegen in der "sessions.php"
der last visit mod will das ich das tu
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


in meiner datei sieht es an dieser stelle aber so aus:
Code: Select all
//<!-- BEGIN Unread Post Information to Database Mod -->

   if(!empty($upi2db_config['upi2db_on']))

   {

      $save_time = time() - ($upi2db_config['auto_read_after_days'] * 86400);



      $sql = "DELETE FROM " . UPI2DB_READ_TOPICS_TABLE . "

         WHERE visit_time < $save_time";



      if (!$result = $db->sql_query($sql) )

      {

         message_die(GENERAL_ERROR, "Couldn't remove Topic Read database", "", __LINE__, __FILE__, $sql);

      }

   }

//<!-- END Unread Post Information to Database Mod -->


hat da wer eine idee oder kann mir da helfen?
wenn wer beide mods in seinem forum hat kann er mir vielleicht seine sessions.php zukommen lassen?

danke
Stone
Poster
Poster
 
Posts: 2
Joined: Fri 17. Jun, 2005 11:20

Postby Beeveer on Mon 08. Aug, 2005 17:39

Search for

Code: Select all
$sql = "UPDATE " . USERS_TABLE . "


instead, and look then if the code looks like you have to search.
User avatar
Beeveer
brilliant supporter
 
Posts: 264
Joined: Tue 30. Nov, 2004 19:13
Location: Boskoop, South-Holland, the Netherlands

Postby Stone on Mon 08. Aug, 2005 19:06

Beeveer wrote:Search for

Code: Select all
$sql = "UPDATE " . USERS_TABLE . "


instead, and look then if the code looks like you have to search.

there is no code they looks like the code i need to edit

i find this code:
Code: Select all
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";
and
Code: Select all
if ( $userdata['user_id'] != ANONYMOUS )
               {
                  $sql = "UPDATE " . USERS_TABLE . "
                     SET user_session_time = $current_time, user_session_page = $thispage_id
                     WHERE user_id = " . $userdata['user_id'];


but i need
Code: Select all
#
#-----[ FIND ]------------------------------------------------
#
if (
{// (
$last_visit = (

$sql = "UPDATE " . USERS_TABLE . "
SET
Stone
Poster
Poster
 
Posts: 2
Joined: Fri 17. Jun, 2005 11:20


Return to Last visit [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron