Log IP Address on Registration

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
112
78%
Very Good
16
11%
Good
8
6%
Fair
3
2%
Poor
4
3%
 
Total votes: 143

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost » Sat Feb 18, 2006 1:22 am

I can't find above code in the file

That's what you said. And like I said, I'll be better able to help you once you post a link to your board / your user_edit_body.tpl file. With it I can attempt to guess where else it might go. Without it, all I can really do is ask for it ;)

Bustelo
Registered User
Posts: 17
Joined: Fri Feb 17, 2006 3:54 pm

Post by Bustelo » Sat Feb 18, 2006 5:39 am

I've read through most of this of thread, but I have a few quick questions I'm unclear about before I install it, if someone could be kind enough to answer them for me...

1. Where exactly does the IP appear on the site?

2. Is it visible to everyone, or just Administrators and/or moderators?

3. If it is visible to everyone, can that be restricted to just Administrators and/or moderators?

4. Is the IP made available via the Admin Userlist MOD in the current release, or would I need to make edits to have them appear there?

Any help would be greatly appreciated.

Thanks.

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost » Sat Feb 18, 2006 6:02 am

Bustelo wrote: 1. Where exactly does the IP appear on the site?

In the ACP. When you're editing users through it.
2. Is it visible to everyone, or just Administrators and/or moderators?

Pursuant to the above, it's only available to admins.
4. Is the IP made available via the Admin Userlist MOD in the current release, or would I need to make edits to have them appear there?

There are two versions of the Admin Userlist MOD that you might be refering to. The changes necessary to add the registration ip to the unvalidated 2.0.5a of the admin userlist can be found here:

http://www.phpbb.com/phpBB/viewtopic.ph ... 90#1951190

The changes necessary to add the registration ip to the validated 2.0.2 of the admin userlist can be found here:

http://www.phpbb.com/phpBB/viewtopic.ph ... 46#1558346

neoi99
Registered User
Posts: 6
Joined: Mon Jan 10, 2005 2:48 pm

Post by neoi99 » Sat Feb 18, 2006 6:45 am

TerraFrost wrote:
I can't find above code in the file

That's what you said. And like I said, I'll be better able to help you once you post a link to your board / your user_edit_body.tpl file. With it I can attempt to guess where else it might go. Without it, all I can really do is ask for it ;)
I post the link here for your reference,

http://www.hkbiggroup.org/templates/fis ... t_body.tpl

(my phpbb just deleted for upgrading, but I hvae keep the backup of all file)
Thank's

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost » Sun Feb 19, 2006 1:47 am

Try looking for this, instead:

Code: Select all

<tr> 
<td class="cat" colspan="2">&nbsp;</td>
</tr>
<tr> 
<th colspan="2">{L_PROFILE_INFO}</th>

Bustelo
Registered User
Posts: 17
Joined: Fri Feb 17, 2006 3:54 pm

Post by Bustelo » Sun Feb 19, 2006 1:57 am

TerraFrost wrote: The changes necessary to add the registration ip to the validated 2.0.2 of the admin userlist can be found here:

http://www.phpbb.com/phpBB/viewtopic.ph ... 46#1558346

Yup, that did it. And Niko's MOD to get the zeros replaced worked perfectly too.

Thanks for a great MOD. I have rated it Excellent!

neoi99
Registered User
Posts: 6
Joined: Mon Jan 10, 2005 2:48 pm

Post by neoi99 » Sun Feb 19, 2006 4:23 pm

TerraFrost wrote: Try looking for this, instead:

Code: Select all

<tr> 
<td class="cat" colspan="2">&nbsp;</td>
</tr>
<tr> 
<th colspan="2">{L_PROFILE_INFO}</th>


Do you mean I change code to

Code: Select all

-----[ FIND ]------------------------------------------
#
	]<tr> 
<td class="cat" colspan="2">&nbsp;</td>
</tr>
<tr> 
<th colspan="2">{L_PROFILE_INFO}</th>
#
#-----[ BEFORE, ADD ]-----------------------------------
#
	<tr> 
	  <td class="row1"><span class="gen">{L_REGIP}: </span></td>
	  <td class="row2"><span class="gen">{USER_REGIP}</span></td>
	  </td>
	</tr>

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost » Sun Feb 19, 2006 6:41 pm

Yup - although you don't want to include that ] ;)

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost » Wed Feb 22, 2006 4:42 am

Someone asked me to write an add-on to this MOD that prevents people from registering x or more accounts where x is a number specified by you (by default, it's 3). Here it is:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) )
#
#-----[ BEFORE, ADD ]-----------------------------------
#
if ( $mode == 'register' && !$userdata['session_logged_in'] )
{
	$sql = 'SELECT COUNT(*) AS regip_count 
		FROM ' . USERS_TABLE . " 
		WHERE user_regip = '" . $userdata['session_ip'] . "'";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not query user_regip information', '', __LINE__, __FILE__, $sql);
	}
	$row = $db->sql_fetchrow($result);

	if ( $row['regip_count'] >= 3)
	{
		message_die(GENERAL_MESSAGE,'Registration attempt blocked.<br />You\'ve already registered to many times');
	}
}

Peter77sx
Registered User
Posts: 3253
Joined: Wed Nov 09, 2005 2:51 pm

Post by Peter77sx » Wed Feb 22, 2006 7:14 am

Oh that is a great idea. thank you. 8)

User avatar
Lobo_UU
Registered User
Posts: 39
Joined: Sat Dec 31, 2005 6:37 am
Location: Earth
Contact:

Post by Lobo_UU » Tue Feb 28, 2006 9:19 am

Please don't think that I've not read this thread so if this problem is here I must have missed it, but when I tried to install this I got the following error.

Code: Select all

IN-LINE FIND FAILED: In file [includes/usercp_register.php] could not find:

. "', '" . str_replace("\'", "''", $icq)
What could possibly be the problem/remedy to this quandry? Thank you kindly for any help :)

Eddy Kiprich
Registered User
Posts: 149
Joined: Sun Dec 18, 2005 1:22 pm
Location: The Netherlands

Post by Eddy Kiprich » Sun Mar 05, 2006 6:14 pm

Do you have the birthday mod installed? Because if I am right I have the same problem.

TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost » Mon Mar 06, 2006 4:29 am

Eddy Kiprich wrote: Do you have the birthday mod installed? Because if I am right I have the same problem.

I thought I had already posted a solution to your problem. Just because I haven't released an updated version of either MOD doesn't mean that both can't be installed along-side one another, none-the-less ;)

Lobo_UU - I can't really speculate as to what your problem is (Eddy might be right, but I can't say for sure) until I've seen your usercp_register.php file. Try copying / renaming it to usercp_register.php.txt and posting the link.

BigRed01
Registered User
Posts: 472
Joined: Mon Jan 24, 2005 9:26 am
Location: The upper midwest

Post by BigRed01 » Mon Mar 06, 2006 7:46 am

Works perfectly!

depablo
Registered User
Posts: 70
Joined: Sat Apr 23, 2005 10:09 am

Post by depablo » Wed Mar 08, 2006 12:59 pm

I have a question, I searched but never found anything similar.

Carried out a new install of latest version phpbb, set up some posts and all was well.
Installed easymod without a hitch, then installed terrafrosts log ip mod.
It also installed perfectly and logged the ip of a test account.

What happens now when I view the board I am guest, I log in as admin and it says their are 2 users. In the ACP it shows myself and guest with the same IP?

Surely the guests viewing should show zero when I am logged in?
Had to delete the board as I messed it up trying to uninstall the mod.

Posted here because it was the only mod I installed, if its wrong place could you point out theright board.

many thanks

Post Reply

Return to “[2.0.x] MOD Database Releases”