Last visit mod 2.0.18 Problem

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 extralarge on Fri 09. Dec, 2005 22:18

New error: Parse error: parse error, unexpected '}' in /home/www/web355/html/phpBB2/includes/sessions.php on line 399


Came when I updated the files manually.

Here is my includes/sessions.php

I have also tried it with one you have provided in another post from you (http://mods.db9.dk/viewtopic.php?t=7030), got the same error.

Should I run the "last_visit_db_update" again?

Thanks for your patient!
extralarge
Poster
Poster
 
Posts: 18
Joined: Mon 05. Dec, 2005 21:34

Postby acoolwelshbloke on Fri 09. Dec, 2005 22:40

Ok I found your errors!

You did not follow the mod instructions you naughty forum user!

FIND IN YOUR SESSIONS.PHP:
Code: Select all
   //if ( $user_id != ANONYMOUS )
   {
      $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;

      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";
         if ( !$db->sql_query($sql) )
         {
            message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
         }
      }

      $userdata['user_lastvisit'] = $last_visit;


SHOULD BE:
Code: Select all
   //if ( $user_id != ANONYMOUS )
   //{
      $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;

      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";
         if ( !$db->sql_query($sql) )
         {
            message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
         }
      }

      $userdata['user_lastvisit'] = $last_visit;
Last edited by acoolwelshbloke on Fri 09. Dec, 2005 22:43, edited 1 time in total.
www.thegamersforums.com
<b><u>For All Your Gaming Needs!</u></b>
acoolwelshbloke
Poster
Poster
 
Posts: 66
Joined: Wed 02. Nov, 2005 15:09

Postby extralarge on Fri 09. Dec, 2005 22:42

Forgive a NOOB, I did as good as I could!
extralarge
Poster
Poster
 
Posts: 18
Joined: Mon 05. Dec, 2005 21:34

Postby acoolwelshbloke on Fri 09. Dec, 2005 22:45

Hehehehe no problem, Been there and done it mate!
www.thegamersforums.com
<b><u>For All Your Gaming Needs!</u></b>
acoolwelshbloke
Poster
Poster
 
Posts: 66
Joined: Wed 02. Nov, 2005 15:09

Postby extralarge on Fri 09. Dec, 2005 22:55

Just uploded the changed file, but same error.

EDIT: sorry new error: Parse error: parse error, unexpected '}' in /home/www/web355/html/phpBB2/includes/sessions.php on line 398

forgot to empty the cache - sorry.

EDIT 2: solved this error, now I get: Fatal error: Call to undefined function: session_pagestart() in /home/www/web355/html/phpBB2/intro.php on line 34

Could you please take at look at my intro

Hope it is not to much to ask for your help once (ore more) more!
extralarge
Poster
Poster
 
Posts: 18
Joined: Mon 05. Dec, 2005 21:34

Postby acoolwelshbloke on Sat 10. Dec, 2005 22:43

Intro.php???????

What is that????

Never heard of that file, I guess it is from a third party mod. I do not give support on other mods. I sujest you either remove it or go to the site that developes that mod and seek support there. It may not be compatabile with the last visit mod hense you can not use both mods at the same time on the same board sorry.
www.thegamersforums.com
<b><u>For All Your Gaming Needs!</u></b>
acoolwelshbloke
Poster
Poster
 
Posts: 66
Joined: Wed 02. Nov, 2005 15:09

Postby extralarge on Sun 11. Dec, 2005 16:29

It should be compatible - this is/was/came from the Intro and Portal Mod. I installed this Mod with EMI without a problem, in the admin zone it says that you now can add the Last Visit Mod and the Birthday Mod from Niels, and also the Chatbox Mod from smartor!
extralarge
Poster
Poster
 
Posts: 18
Joined: Mon 05. Dec, 2005 21:34

Postby extralarge on Sun 11. Dec, 2005 17:17

I am not sure if this helps, after I got the errror:

Parse error: parse error, unexpected '}' in /home/www/web355/html/phpBB2/includes/sessions.php on line 398

I deleted this } and got the Fatal Error at next.
extralarge
Poster
Poster
 
Posts: 18
Joined: Mon 05. Dec, 2005 21:34

PreviousNext

Return to Last visit [2.0.10/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron