[BETA] Advanced IP Tools Pack

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
net83it
Registered User
Posts: 500
Joined: Sun Jan 15, 2006 2:42 pm
Location: Sicily
Contact:

Post by net83it »

i added the code only to the first occurence
groundfighter wrote: It does do that, in the user profile. I have about 50 pages in mine :wink:


yes, you are right. it records each vist.

there is a way to limit it? in a long term this funciont will consume more and more database space. maybe it could record only last 20 logins... any idea to implement this?

net83it
Registered User
Posts: 500
Joined: Sun Jan 15, 2006 2:42 pm
Location: Sicily
Contact:

Post by net83it »

hello

please see the below pic

Image

why don't i see any information about browser of that user and of the google bot?

these pic http://img.photobucket.com/albums/v442/ ... online.png from the first post shows that infos

thank you

arod-1
Registered User
Posts: 1327
Joined: Mon Sep 20, 2004 1:33 pm

Post by arod-1 »

very small comment:
when testing for wildcards, you replace the '*' with a '%' in the search string like so:

Code: Select all

for ($i = 0; $i <= $ip_pieces_count; $i++)
			{
				$search_ip .= ( $ip_pieces[$i] == '*' ) ? '%' : sprintf('%02x', $ip_pieces[$i]);
			}
% stands for any number of characters. in the encoded ip, it should be exactly 2 characters, so i think it is safer to use '__'.

net83it
Registered User
Posts: 500
Joined: Sun Jan 15, 2006 2:42 pm
Location: Sicily
Contact:

Post by net83it »

kulinar wrote: @pentapenguin
I have such a forum bug: when a thread is started by anonymous/guest and a user makes a reply/quote after sending his post he gets 'User does not exist.' message. I checked all forum files and it appeares that the only file that contains a message is functions.php, modified by your mod:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php


#
#-----[ FIND ]------------------------------------------
#
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
	}


#
#-----[ AFTER, ADD ]------------------------------------------
#

	// Start Advanced IP Tools Pack MOD
	if ( $db->sql_affectedrows() == 0 )
	{
		message_die(GENERAL_ERROR, 'User does not exist.');
	}
	// End Advanced IP Tools Pack MOD
I guess somehow your mod causes the problem. If I am not right, please exuse me and if I am right - please help!

Thanks in advance.
darakhshan wrote: Serious bug

today I noticed when I reply to message posted by a guest
I receive

User does not exist erro

I go back and I see my reply has been posted but every time I receive the same error

I was told this is due to your mod

Any body else having this problem?

A guest can reply to a guest
but a registered user replying to a guest receives

User does not exist Error


what is the solution please reply

thanks
Grinch wrote: This mod is interfering with another mod on my site. I've been trying to track down what the problem is and finally pin pointed this mod as the culprit.

It interferes with the "Complete Banner Hack" by Niels. Specifically the Banner Admin page. When I try to add a new banner account, I get the message "General Error - User does not exist."

If I remove the following from includes/functions.php, the banner mod admin page works again.

Code: Select all

	// Start Advanced IP Tools Pack MOD
	if ( $db->sql_affectedrows() == 0 )
	{
		message_die(GENERAL_ERROR, 'User does not exist.');
	}
	// End Advanced IP Tools Pack MOD
I don't know enough about php to figure out how to fix this. :(
rajem wrote: Why is the following piece of code added into functions.php?

Code: Select all

// Start Advanced IP Tools Pack MOD
	if ( $db->sql_affectedrows() == 0 )
	{
		message_die(GENERAL_ERROR, 'User does not exist.');
	}
	// End Advanced IP Tools Pack MOD
It always sends an error when someone posts, even if the post goes through. Works fine without it too...or so it seems...

Also my search page comes up blank, no error messages or anything, just completely blank.



same problem here.
every time an user posts o replyes he gets that error. the message is posted but no notification email is sent. i suppose that when that code is executed it stops the script.

i solvede commented out the following code in red
#-----[ OPEN ]------------------------------------------
#
includes/functions.php


#
#-----[ FIND ]------------------------------------------
#
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql);
}


#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start Advanced IP Tools Pack MOD
if ( $db->sql_affectedrows() == 0 )
{
message_die(GENERAL_ERROR, 'User does not exist.');
}
// End Advanced IP Tools Pack MOD



#
#-----[ FIND ]------------------------------------------


so, now i have a question, what does that code? what does it mean?

energydriver
Registered User
Posts: 1
Joined: Fri Aug 04, 2006 5:45 pm

Post by energydriver »

net83it wrote: If I remove the following from includes/functions.php, the banner mod admin page works again.

Code: Select all

	// Start Advanced IP Tools Pack MOD
	if ( $db->sql_affectedrows() == 0 )
	{
		message_die(GENERAL_ERROR, 'User does not exist.');
	}
	// End Advanced IP Tools Pack MOD

I had to remove this too, because another Mod does not work if these lines are included. But I do not know how the Advanced-IP-Tools works correctly if these lines are missing. :roll:

bbnewbie
Registered User
Posts: 36
Joined: Sun Aug 20, 2006 5:02 pm

Post by bbnewbie »

very good mod, but when u remove a user its logins remain stored in the "logins" table.

where's a way to avoid a manual cleaning?
(such a "purge logins table" or a way to modify the erase user command)

User avatar
nico66s
Registered User
Posts: 132
Joined: Tue Nov 15, 2005 5:41 pm
Location: Padova, Italy
Contact:

Post by nico66s »

bbnewbie wrote: very good mod, but when u remove a user its logins remain stored in the "logins" table.

where's a way to avoid a manual cleaning?
(such a "purge logins table" or a way to modify the erase user command)


This would be a usefull addon.

User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Post by pentapenguin »

energydriver wrote:
net83it wrote:If I remove the following from includes/functions.php, the banner mod admin page works again.

Code: Select all

	// Start Advanced IP Tools Pack MOD
	if ( $db->sql_affectedrows() == 0 )
	{
		message_die(GENERAL_ERROR, 'User does not exist.');
	}
	// End Advanced IP Tools Pack MOD

I had to remove this too, because another Mod does not work if these lines are included. But I do not know how the Advanced-IP-Tools works correctly if these lines are missing. :roll:

Yes, you can safely remove that.
bbnewbie wrote: very good mod, but when u remove a user its logins remain stored in the "logins" table.

where's a way to avoid a manual cleaning?
(such a "purge logins table" or a way to modify the erase user command)

Yes, this MOD needs some real work including that. I'll try to get a new version 0.4.0 out soon which will have bug fixes and new improvements like that.

If anyone has any suggestions, please tell me! I know I haven't updated this in ages and I apologize.
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.

trv
Registered User
Posts: 64
Joined: Sun Nov 07, 2004 4:39 pm

Post by trv »

you could make it compatible with CH 2.1.6 ;)

Chalkstar2188
Registered User
Posts: 5
Joined: Mon Oct 02, 2006 10:00 am

Post by Chalkstar2188 »

I had a few questions. Firstly, I looked over it and couldnt see if it said if it was phpbb 2.0.21 compatible. I have phpbb 2.0.21 and wanted to use this tool. Would that be possible.

Also, under the instructions, it has:

Code: Select all

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_users 
ADD user_registered_ip VARCHAR(8),
ADD user_registered_hostname VARCHAR(255 );

ALTER TABLE phpbb_sessions 
ADD session_user_agent VARCHAR( 255 ) NOT NULL AFTER session_ip;

CREATE TABLE phpbb_logins (
login_id mediumint(8) unsigned NOT NULL auto_increment,
login_userid mediumint(8) NOT NULL default '0',
login_ip varchar(8) NOT NULL default '0',
login_user_agent varchar(255) NOT NULL default 'n/a',
login_time int(11) NOT NULL default '0',
PRIMARY KEY (login_id)
);

What does that mean I have to do? I get that I have to edit the other parts and that seems simple enough. I'm not all that experianced with php but would love to use this sort of tool.

EDIT:

Hmm, so far its proved long and a bit hard. I am just intending for it to be used on the subSilver and bbTech skins.

Chalkstar2188
Registered User
Posts: 5
Joined: Mon Oct 02, 2006 10:00 am

Post by Chalkstar2188 »

Apologies for the double post but this sunk down the page quickly.

I was wondering if there is anyone who knows if support for this is still avaliable.

User avatar
nico66s
Registered User
Posts: 132
Joined: Tue Nov 15, 2005 5:41 pm
Location: Padova, Italy
Contact:

Post by nico66s »

It is compatible with 2.0.21.

The SQL changes has to be done in the database.

Changes on the .tpl files must be done for all templates you want to use.

Refer to this guides
http://www.phpbb.com/kb/article.php?article_id=150
http://www.phpbb.com/kb/article.php?article_id=175

Chalkstar2188
Registered User
Posts: 5
Joined: Mon Oct 02, 2006 10:00 am

Post by Chalkstar2188 »

So would the changes for a particular skin, possibly be the same for everyone (like many people using the same skin would have the exact same code).

Is there any way to make the changes to the database, without using phpMyAdmin? I'm just not sure if the other admins of the site would want to upload a program like that until I can get in contact with them.

User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Post by pentapenguin »

Chalkstar218 wrote: Is there any way to make the changes to the database, without using phpMyAdmin? I'm just not sure if the other admins of the site would want to upload a program like that until I can get in contact with them.

Use this tool: http://www.phpbbstyles.com/sql.php
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.

User avatar
pentapenguin
Former Team Member
Posts: 11030
Joined: Thu Jul 01, 2004 4:15 am
Location: GA, USA

Post by pentapenguin »

MOD UPDATED TO 0.3.3

This update fixed a problem in the update file not supporting phpBB 2.0.21. I also added a MODX installation guide. I will try to start development up again soon on this and get all the fixed done everyone has asked for. Do note though that even though this MOD has been in beta forever, it's stable and used on my site since day one without any problems.
Support Resources: Support Request Template
If you need professional assistance with your board, please contact me for my reasonable rates.

Post Reply

Return to “[2.0.x] MODs in Development”