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

diabolic.bg
Registered User
Posts: 447
Joined: Mon Dec 11, 2006 3:41 pm
Location: Bulgaria, Sofia
Contact:

Re: Log IP Address on Registration

Post by diabolic.bg »

vgamemaster wrote:hey Im haveing some trouble with this part of the code:

Code: Select all

#-----[ SQL ]-------------------------------------------
#
ALTER TABLE phpbb_users ADD user_regip CHAR(8) NOT NULL DEFAULT '0';
#
could someone please tell me how to do this

thanks
Open phpMyadmin.
In the left frame chose your DB's name.
In right frame on the top press SQL button.
In opened window copy query

Code: Select all

ALTER TABLE phpbb_users ADD user_regip CHAR(8) NOT NULL DEFAULT '0';
and press Go.

This is all.

vgamemaster
Registered User
Posts: 13
Joined: Wed Oct 17, 2007 2:30 pm

Re: Log IP Address on Registration

Post by vgamemaster »

Thanks that part worked great! Now Im getting a error. After I completed the Mod I tried to pull up my admin panel. This is the error I got.

Parse error: parse error, unexpected T_VARIABLE in \\nawinfs02\home\users\web\b398\rh.moellermm\forum\language\lang_english\lang_admin.php on line 745


Am I doing something wrong?

thanks

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

Re: Log IP Address on Registration

Post by TerraFrost »

vgamemaster wrote:Thanks that part worked great! Now Im getting a error. After I completed the Mod I tried to pull up my admin panel. This is the error I got.

Parse error: parse error, unexpected T_VARIABLE in \\nawinfs02\home\users\web\b398\rh.moellermm\forum\language\lang_english\lang_admin.php on line 745


Am I doing something wrong?

thanks
You've probably edited it incorrectly (I'm going to guess you installed this MOD by hand?). Post the file (using the code bbcode) and we'll be able to help you further :)

vgamemaster
Registered User
Posts: 13
Joined: Wed Oct 17, 2007 2:30 pm

Re: Log IP Address on Registration

Post by vgamemaster »

Alright

Code: Select all

$lang['Install_No_PCRE']$lang['Registration_IP'] = 'Registration IP Address';
The part after the [$lang['Install_No_PCRE'] is the part i copied and pasted in.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Log IP Address on Registration

Post by RMcGirr83 »

vgamemaster wrote:Alright

Code: Select all

$lang['Install_No_PCRE']$lang['Registration_IP'] = 'Registration IP Address';
The part after the [$lang['Install_No_PCRE'] is the part i copied and pasted in.
should be

Code: Select all

$lang['Install_No_PCRE'] = 'phpBB2 Requires the Perl-Compatible Regular Expressions Module for PHP which your PHP configuration doesn\'t appear to support!';
$lang['Registration_IP'] = 'Registration IP Address';
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

vgamemaster
Registered User
Posts: 13
Joined: Wed Oct 17, 2007 2:30 pm

Re: Log IP Address on Registration

Post by vgamemaster »

That worked!
Thanks a bundle!

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

Re: Log IP Address on Registration

Post by TerraFrost »

The problem is you did IN-LINE AFTER, ADD instead of AFTER, ADD.

KeithSloan
Registered User
Posts: 17
Joined: Sat Oct 27, 2007 8:59 am

Re: Log IP Address on Registration

Post by KeithSloan »

I am having a problem with this Mod.

The changes to user_edit_body.tpl don't seem to be being picked up. Are they cached somewhere and I have to restart something?

when I check out a user the display is just as it was before with no IP address or fields for.

Many Thanks : Keith

KeithSloan
Registered User
Posts: 17
Joined: Sat Oct 27, 2007 8:59 am

Re: Log IP Address on Registration

Post by KeithSloan »

I am having a problem with this Mod.

I don't seem to be picking up changes to

templates/subsilver/admin/user_edit_body.tpl which I have uploaded to the website

When I go and check a user the display is the same as it was no new field for the IP address.
Does it get cached? Do I need to restart anything.

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

Re: Log IP Address on Registration

Post by TerraFrost »

KeithSloan wrote:I am having a problem with this Mod.

The changes to user_edit_body.tpl don't seem to be being picked up. Are they cached somewhere and I have to restart something?

when I check out a user the display is just as it was before with no IP address or fields for.

Many Thanks : Keith
By default, phpBB2 doesn't cache stuff. What seems most likely is that you just modified subSilver's user_edit_body.tpl file without touching that file in other themes.

KeithSloan
Registered User
Posts: 17
Joined: Sat Oct 27, 2007 8:59 am

Re: Log IP Address on Registration

Post by KeithSloan »

"By default, phpBB2 doesn't cache stuff. What seems most likely is that you just modified subSilver's user_edit_body.tpl file without touching that file in other themes."

Your correct I just changed templates/subsilver/admin/user_edit_body.tpl as per the instructions.

The other files changed were
includes/usercp_register.php
admin/admin_users.php
language/lang_english/lang_admin.php

What are these other themes? I don't understand the terminology or what is required?

Do I have to also copy the file to Helius and MyApple?

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

Re: Log IP Address on Registration

Post by TerraFrost »

KeithSloan wrote:"By default, phpBB2 doesn't cache stuff. What seems most likely is that you just modified subSilver's user_edit_body.tpl file without touching that file in other themes."

Your correct I just changed templates/subsilver/admin/user_edit_body.tpl as per the instructions.

The other files changed were
includes/usercp_register.php
admin/admin_users.php
language/lang_english/lang_admin.php

What are these other themes? I don't understand the terminology or what is required?

Do I have to also copy the file to Helius and MyApple?
Helius and MyApple would be the other themes I was referring to. Do the changes that you did to the subSilver files to Helius and MyApple, as well.

praveenc85
Registered User
Posts: 3
Joined: Wed Dec 12, 2007 4:30 pm

Re: Log IP Address on Registration

Post by praveenc85 »

Hello,

i am using the latest stable version,
i tried this mod by following the instructions exactly and after completion i checked it but getting error.
when i try to register for user i am getting following error,

Could not insert data into users table

DEBUG MODE

SQL Error : 1136 Column count doesn't match value count at row 1

INSERT INTO phpbb_users (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_regip, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) VALUES (22, 'praveen123', 1197486781, '827ccb0eea8a706c4c34a16891f84e7b', 'praveen_vee@yahoo.com', '3b5c7958, ', '', '', '', '', '', '', '', 0, 0, '', '', '', 1, 1, 0, 1, 1, 0, 1, 1, 5.5, 'D d M, Y g:i a', 'english', 2, 0, 1, 0, 'de31069392150f5')

Line : 647
File : usercp_register.php


i rechecked thrice on the mod but i am sure i followed the exact instruction. CAn any one help me out?

Thanks,
Praveen Kumar C
Cheap domain regsitration & web hosting at http://www.auxilsolutions.com

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

Re: Log IP Address on Registration

Post by TerraFrost »

Here are the column names and their corresponding values:

Code: Select all

user_id	22
username	'praveen123'
user_regdate	1197486781
user_password	'827ccb0eea8a706c4c34a16891f84e7b'
user_email	'praveen_vee@yahoo.com'
user_icq	'3b5c7958, '
user_website	''
user_occ	''
user_from	''
user_interests	''
user_sig	''
user_sig_bbcode_uid	''
user_avatar	''
user_avatar_type	0
user_viewemail	0
user_aim	''
user_regip	''
user_yim	''
user_msnm	1
user_attachsig	1
user_allowsmile	0
user_allowhtml	1
user_allowbbcode	1
user_allow_viewonline	0
user_notify	1
user_notify_pm	1
user_popup_pm	5.5
user_timezone	'D d M, Y g:i a'
user_dateformat	'english'
user_lang	2
user_style	0
user_level	1
user_allow_pm	0
user_active	'de31069392150f5'
user_actkey
The number of column values you have is one less then the number of column rows you have.

Also, it looks like you're setting the user_icq field to what the user_regip field should be set to.

I can't say much more without being able to look at the source to usercp_register.php.

praveenc85
Registered User
Posts: 3
Joined: Wed Dec 12, 2007 4:30 pm

Re: Log IP Address on Registration

Post by praveenc85 »

Hi TerraFrost,

This is what the the changed codes in that pages,

$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_regip, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . $userdata['session_ip'] . "''" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )


"The number of column values you have is one less then the number of column rows you have."
how and where to add?

Thanks,
Praveen Kumar C

Post Reply

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