Welcome, Guest. Please Login or Register.
November 23, 2024, 11:10:17 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1 « previous next »
Pages: [1] Reply Ignore Print
Author Topic: [Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1  (Read 71955 times)
MC600
YaBB God
*****
Posts: 968


Jetzt habe ich Zähne!

ICQ - 168723559 WWW
[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« on: January 06, 2003, 12:17:09 PM »
Reply with quote

Unfortunately, I don't speak English.

LastLogin Profile V1.1 by MC600

This modification show the last UserLogin on the user profile - for YaBB SE 1.4.x and 1.5.x german/english - Backup: german.lng / english.lng und Profile.php

To this downloads here click: LastLogin Profile V1.0 for YaBB SE 1.4.x
To this downloads here click: LastLogin Profile V1.1 for YaBB SE 1.5.x

Here one Screenshot (V1.5.x): User Profil

The MOD shows the last Login, not the last visit!
« Last Edit: January 07, 2003, 09:58:18 AM by MC600 » Logged

Freundliche Grüße aus Hönow - MC600 - Forum Gegen Krebs
Newsletter Service - Info´s über MOD´s von MC600 - Hier eintragen
Zombie
Noobie
*
Posts: 29


I'm a llama!

Re:[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« Reply #1 on: January 06, 2003, 12:47:18 PM »
Reply with quote

Thanks, I was looking for a mod like this. ;D
Logged
Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« Reply #2 on: January 06, 2003, 12:48:03 PM »
Reply with quote

Did you update the way the lastlogin value was updated?

There is a problem with that part of the code.  If not, it's a crucial part of the mod you're missing.
Logged

MC600
YaBB God
*****
Posts: 968


Jetzt habe ich Zähne!

ICQ - 168723559 WWW
Re:[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« Reply #3 on: January 06, 2003, 01:27:31 PM »
Reply with quote

Quote from: Joseph Fung on January 06, 2003, 12:48:03 PMDid you update the way the lastlogin value was updated?

No.

The MOD shows the last Login, not the last visit.
Logged

Freundliche Grüße aus Hönow - MC600 - Forum Gegen Krebs
Newsletter Service - Info´s über MOD´s von MC600 - Hier eintragen
Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« Reply #4 on: January 06, 2003, 02:01:11 PM »
Reply with quote

Hmmm - does it take into account "logins" when someone has a cookie stored?

Eg. I log in in January, but my cookie keeps me logged in till May.  Even though I visit in May, does my last logged in still see January?
Logged

MC600
YaBB God
*****
Posts: 968


Jetzt habe ich Zähne!

ICQ - 168723559 WWW
Re:[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« Reply #5 on: January 06, 2003, 10:25:44 PM »
Reply with quote

e.g. with the MOD I can see whether a new user - login could...
Logged

Freundliche Grüße aus Hönow - MC600 - Forum Gegen Krebs
Newsletter Service - Info´s über MOD´s von MC600 - Hier eintragen
PioneeR
Llama Hunter
YaBB God
*****
Posts: 767


Re:[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« Reply #6 on: January 06, 2003, 10:34:22 PM »
Reply with quote

I have installed Show LastLogin in Profile... and if a user is 'forever logged in' the last login doesnt change.
Logged
MC600
YaBB God
*****
Posts: 968


Jetzt habe ich Zähne!

ICQ - 168723559 WWW
Re:[Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1
« Reply #7 on: January 07, 2003, 12:09:09 AM »
Reply with quote

The MOD shows the last Login, not the last visit!
Logged

Freundliche Grüße aus Hönow - MC600 - Forum Gegen Krebs
Newsletter Service - Info´s über MOD´s von MC600 - Hier eintragen
edi67
Jr. Member
**
Posts: 97


I'm a llama!

Re:[Done 1.4.x/1.5.x - Update] LastLogin Profile V1.1
« Reply #8 on: March 26, 2004, 12:13:21 PM »
Reply with quote

I installed it but


this mod return me back always this data:  Tuesday  01 January 1970, 01:03
Logged

Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:[Done 1.4.x/1.5.x - Update] LastLogin Profile V1.1
« Reply #9 on: March 26, 2004, 01:55:25 PM »
Reply with quote

Quote from: edi67 on March 26, 2004, 12:13:21 PM
I installed it but


this mod return me back always this data:  Tuesday  01 January 1970, 01:03

You probably had to install it manually because the mod was trying to replace a query.  Is that right?

Here is what I did, and it works on my board though it might not be the best way.  I had no idea how to format the time, so I just copied the dateRegistered time formatting, and changed it to the last login.


   if ($memsettings['lastLogin'] && $memsettings['lastLogin'] != '0000-00-00')
   {
      $fmt = '%d %b %Y ' . (substr_count($settings[17], '%H') == 0 ? '%I:%M:%S %p' : '%T');
      $lastlog = strftime($fmt, $memsettings['lastLogin'] + $timeadjust);
   }
   else
      $lastlog = $txt[470];


Just above this code, there is the query, the beginning looks like this, except the SELECT line is a lot longer.

   $yytitle = $txt[79];
   $request = mysql_query("
      SELECT passwd, realName, emailAddress,


just add lastLogin at the end.  Make sure the second L is capitalized and the rest is lowercase.

Now look for another query.  Again, this is just the beginning of it, the SELECT line is much longer than this.

   # get the member's info
   $request = mysql_query("
      SELECT passwd, realName,

Just like last time, add Lastlogin at the end.

Now look for this:

                     <td><font size="2"><b>' . $txt[233] . ': </b></font></td>
                     <td><font size="2">' . $dr . '</font></td>
                  </tr><tr>

And add this after that:

                     <td><font size="2"><b>Last Login: </b></font></td>
                     <td><font size="2">' . $lastlog . '</font></td>
                  </tr><tr>


You can change Last Login to put it in the language file, but I just hardcoded the text in for simplicity, since everyone on my site reads English...


This still has the problem with last login not showing their last visit...  I'll post a fix for that later when I get home from work.
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:[Done 1.4.x/1.5.x - Update] LastLogin Profile V1.1
« Reply #10 on: March 26, 2004, 02:00:31 PM »
Reply with quote

Nevermind, I just looked at it and the fix is simple.

Open up index.php and look for

 $chklngfile = $chklngfile2 = $settings[23];


add after:


    $lastLog = time();
    $memIP = $REMOTE_ADDR;
    $result =  mysql_query("UPDATE {$db_prefix}members SET lastLogin='$lastLog',memberIP='$memIP' WHERE memberName='$user'") or database_error(__FILE__, __LINE__);
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.4.x/1.5.x - UPDATE] LastLogin Profile V1.1 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.055 seconds with 21 queries.