miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Saving IP address used during registration

Page  Page 2 of 2:  « Previous  1  2  
Author Paul
Lead Developer
#16 | Posted: 16 Oct 2006 03:26 
IP should be shown on Profile's page only for admin. Be sure you are not logged in as admin when viewing it.

Author radeg
Guest
#17 | Posted: 19 Oct 2006 22:10 
Be sure you are not logged in as admin when viewing it.
I sure in it... you can see it too.

Author Paul
Lead Developer
#18 | Posted: 20 Oct 2006 03:26 
Are you sure $l_usrInfo[15] variable is NOT inserted in language pack? If yes, it should NOT be inserted. You must change meaning of it directly in the code for /* Show registration IP in Profile */

Author radeg
Guest
#19 | Posted: 21 Oct 2006 09:25 
Paul, thx!
all is o.k. now

Author tom322
Registered
#20 | Posted: 5 Feb 2007 19:56 | Edited by: tom322 
Here is what I did without core-destruction. While it's obviously not as good as the above solution (which is perfect and easy to use for a moderator at all level and on "remote" computers), it still may be a good solution:

Paste {$thisIp} into the email_admin_userregister_eng.txt file.

The drawback is that you'd have to keep the registration emails of your members handy in case you want to look up their IP...

Author Vodicka
Registered
#21 | Posted: 19 Dec 2008 12:02 
Well, I have just imleplemented it but only a half of it works. It does write the ip into the database (chceked by PHP admin), but it dies nit write anything into the users profile (yes I am logged as admin).

Can it be bit obsolete, if the solution, code is from 2006??

Author Paul
Lead Developer
#22 | Posted: 22 Dec 2008 04:56 
You need to change the index of $l_usrInfo[15] variable to the index calculated dependently on the ordinal number of custom field. I suppose it should be 17 but not sure. Study our article on how to add the new profile field correctly and associate language variable with it.

The code should fully work with the recent miniBB release.

Author Vodicka
Registered
#23 | Posted: 22 Dec 2008 06:06 
Thank you very much! You made my day. This will save a me a lot work! (It was "16" in my case).

Author tom322
Registered
#24 | Posted: 5 Jul 2012 07:06 | Edited by: tom322 
I found yet another alternative way to save user information (not only IP but also other essential details). It's core-destructive but easy to do if you remember to put the change in your custom-changes.txt file ;):

------------

1. Create a text file (could be named: reg-data.txt or something more unique), place it in main forum folder, and make sure it's good for writing (777).

2. Open: bb_func_regusr.php file and paste the following code ABOVE this:

/* Auto Sign-in */
if(!isset($closeRegister) or $closeRegister==0){

# custom - save registration date in a file

$File = "reg-data.txt";
$Handle = fopen($File, 'a');
$Data = "ID: {$insres} / Username: {$username} / IP: {$thisIp} / Email: {$user_email}\r\n";
fwrite($Handle, $Data);
fclose($Handle);

# end custom - save registration

---------------

That way you'll have a record of all newly registered users and can easily look it up if needed. You can then give link to the file to your trusted moderators ;).

Page  Page 2 of 2:  « Previous  1  2 
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Saving IP address used during registration Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB