compatible compatibility not specified not compatible
05.08.10
11.08.10
http://www.boonex.com/unity/forums/#topic/FREE-MOD-DeeEmm-Record-Name-ID-with-IP-Address.htm
You can (fairly) easily record the userid along with the ip address by adding an extra field to the database table and modifying member.php
Here's how...
Add the following fields to the sys_ip_members_visits table in database
ALTER TABLE `sys_ip_members_visits` ADD `UserID` INT( 10 ) NOT NULL
ALTER TABLE `sys_ip_members_visits` ADD `UserName` VARCHAR( 30 ) NOT NULL
Then search for following line in member.php
$sInsertSQL = "INSERT INTO `sys_ip_members_visits` SET `From`='{$sCurLongIP}', `DateTime`=NOW()";
Replace it with
$aMemberInfo = getProfileInfoDirect($member['ID']);
$sUserName = $aMemberInfo['NickName'];
$sInsertSQL = "INSERT INTO `sys_ip_members_visits` SET `From`='{$sCurLongIP}', `DateTime`=NOW(), `UserID`='{$sUserID}', `UserName`='{$sUserName}'";
Now edit inc/classes/BxDolAdminIPBlocklist.php
Find
<tr>
<td>{$sFromC}</td>
<td>{$sDatatimeC}</td>
</tr>
Change it to
<tr>
<td>ID</td>
<td>UserName</td>
<td>{$sFromC}</td>
<td>{$sDatatimeC}</td>
</tr>
Find
$sLastDT = $aIPList['DateTime'];
Add After
$sUserID = $aIPList['UserID'];
$sUserName = $aIPList['UserName'];
Find
$sTableRes .= "<tr><td>{$sFrom}</td><td>{$sLastDT}</td></tr>";
Replace it with
$sTableRes .= "<tr><td>{$sUserID}</td><td>{$sUserName}</td><td>{$sFrom}</td><td>{$sLastDT}</td></tr>";
All Done!!
Now the userid will be recorded with the ip address and displayed in the table on the admin page.
Please Note:
I agree it would be better to add an SQL statement to make it easier to install, if / when I get 5 spare mins I will have a look at this and adding the username too.
I decided to post it up as-is, as I simply do not get the time to package it up as a full mod, and hope that someone will benefit from it.
/DM
Thanks
GJ :)
www.DeeEmm.com