okay so does this look right before i implement it:
throw this in db_input.php:
//
// Comment
//
$user_ip = getenv ("REMOTE_ADDR");
$user_host = getenv ("REMOTE_HOST");
and then find this:
if (!USER_ID) { // Anonymous users, we need to use META refresh to save the cookie
$insert = db_query("INSERT INTO {$CONFIG['TABLE_COMMENTS']} (pid, msg_author, msg_body, msg_date, author_md5_id, author_id) VALUES ('$pid', '$msg_author', '$msg_body', NOW(), '{$USER['ID']}', '0')");
change to:
if (!USER_ID) { // Anonymous users, we need to use META refresh to save the cookie
$insert = db_query("INSERT INTO {$CONFIG['TABLE_COMMENTS']} (pid, msg_author, msg_body, msg_date, author_md5_id, author_id, user_ip, user_host) VALUES ('$pid', '$msg_author', '$msg_body', NOW(), '{$USER['ID']}', '0', '$user_ip','$user_host')");
and find:
} else { // Registered users, we can use Location to redirect
$insert = db_query("INSERT INTO {$CONFIG['TABLE_COMMENTS']} (pid, msg_author, msg_body, msg_date, author_md5_id, author_id) VALUES ('$pid', '".addslashes(USER_NAME)."', '$msg_body', NOW(), '', '".USER_ID."')");
change to:
} else { // Registered users, we can use Location to redirect
$insert = db_query("INSERT INTO {$CONFIG['TABLE_COMMENTS']} (pid, msg_author, msg_body, msg_date, author_md5_id, author_id, user_ip, user_host) VALUES ('$pid', '".addslashes(USER_NAME)."', '$msg_body', NOW(), '', '".USER_ID."','$user_ip', '$user_host')");
(also make sure you added the two columns in your comments table called 'user_ip' and 'user_host')
i havent implemented it yet, waiting for someone to look at it and tell me if itll break. i dont have a test versionof coppermine up.
cheers.
ken
edit: obviously this wont display it within coppermine, youll have to look at it in the actual db. when i have more time to sit down (see next year, im traveling!) and put it together is when ill add it to the display pages (unless someone does it first).