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.