| Solution: How to save IP on sign-up in database. /********************************************/ 
 Add new field in database, using following mySQL command (substitute `minibbtable_users` for your users table name, if it's different):
 
 
 ALTER TABLE `minibbtable_users` ADD `user_customip` VARCHAR(16)  NOT NULL DEFAULT '';This field will contain user registration IP. Determine order number of this field using our tool "determine_fields.php" - place it in forums folder and point URL to it. You will notice order number of this field in your users table.
 
 /********************************************/
 
 Edit $dbUserSheme array setup_options.php, and define new field the following way:
 
 
 'user_customip'=>array(POSITION_NUMBER,'user_customip','')Something like this for default database:
 
 
 $dbUserSheme=array(/********************************************/'username'=>array(1,'username','login'),
 'user_password'=>array(3,'user_password','passwd'),
 'user_email'=>array(4,'user_email','email'),
 'user_icq'=>array(5,'user_icq','icq'),
 'user_website'=>array(6,'user_website','website'),
 'user_occ'=>array(7,'user_occ','occupation'),
 'user_from'=>array(8,'user_from','from'),
 'user_interest'=>array(9,'user_interest','interest'),
 'user_viewemail'=>array(10,'user_viewemail','user_viewemail'),
 'user_sorttopics'=>array(11,'user_sorttopics','user_sorttopics'),
 'language'=>array(14,'language','language'),
 'num_topics'=>array(15,'num_topics',''),
 'num_posts'=>array(16,'num_posts',''),
 'user_custom1'=>array(18,'user_custom1','user_custom1'),
 'user_custom2'=>array(19,'user_custom2','user_custom2'),
 'user_custom3'=>array(20,'user_custom3','user_custom3'),
 'user_customip'=>array(21,'user_customip','')
 );
 
 
 Paste into bb_plugins2.php the following code (note: you must have register_globals turned OFF in php.ini, else this could be hijacked):
 
 
 /* save registration IP *//********************************************/if($action=='register' and isset($GLOBALS['insres']) and $GLOBALS['insres']!=0){
 ${$dbUserSheme['user_customip'][1]}=getIP();
 updateArray(array($dbUserSheme['user_customip'][1]), $Tu, $dbUserId, $GLOBALS['insres']);
 }
 /* --save registration IP */
 
 
 Paste into bb_plugins.php the following code:
 
 
 /* Show registration IP in Profile *//********************************************/
 if($action=='userinfo'){
 foreach($mods as $k=>$v) if(in_array($user_id,$v)) $isMod=1;
 if($user_id==1 or $isMod==1) $l_usrInfo[15]='Registration IP';
 
 if($user_id==1){
 
 function parseUserInfo_user_customip($val){
 return '<a href="'.$GLOBALS['main_url'].'/'.$GLOBALS['indexphp'].
 'action=viewipuser&postip='.$val.'">'.$val.'</a>';
 }
 
 }
 
 }
 
 /* --Show registration IP in Profile */
 
 
 
 IP should be visible in user's profile by admin or moderator. Admin should have linked IP, which goes to all users were posted from this IP.
 
 Enjoy and report the result :-)
 |