[BETA] CodeCrush Log System (v.0.4.2alpha) (Dec-07)

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.
Ajanek
Registered User
Posts: 5
Joined: Tue Jul 11, 2006 2:13 pm

Post by Ajanek »

Sorry for silly question, but does that mod log every user login or just ACP logins?
Blisk
Registered User
Posts: 270
Joined: Wed Aug 20, 2003 10:43 am
Location: Slovenia

Post by Blisk »

I have problems with instalation of latest version of MOD.
cant find in session.php

Code: Select all

#-----[ FIND ]-----------------------------------------
#
					setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
				}

				return $userdata;
			}
#
#-----[ AFTER, ADD ]----------------------------------
#
			//
			// CC IP MOD: session existed, but IP missmatch
			//
			if($board_config['cc_log_on'])
			{
				cc_ip_log($userdata, '', $user_ip, $thispage_id, 0, 2);
			} 
and in file there
admin/admin_user_ban.php there is no

Code: Select all

#-----[ FIND ]------------------------------------------
#
if ( isset($HTTP_POST_VARS['submit']) )

#
#-----[ REPLACE ]------------------------------------------
#
if ( isset($HTTP_POST_VARS['submit']) || isset($HTTP_GET_VARS['submit']) )


#
#-----[ FIND ]------------------------------------------
#
	if ( isset($HTTP_POST_VARS['ban_ip']) )
	{
		$ip_list_temp = explode(',', $HTTP_POST_VARS['ban_ip']);

#
#-----[ REPLACE ]------------------------------------------
#
	if ( isset($HTTP_POST_VARS['ban_ip']) || isset($HTTP_GET_VARS['ban_ip']) )
	{
		$ban_ip = ( isset($HTTP_POST_VARS['ban_ip']) ) ? $HTTP_POST_VARS['ban_ip'] : $HTTP_GET_VARS['ban_ip'];
		$ip_list_temp = explode(',', $ban_ip);
		unset($ban_ip);


#
#-----[ FIND ]------------------------------------------
#
	if ( !empty($HTTP_POST_VARS['username']) )
	{
		$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);

#
#-----[ REPLACE ]------------------------------------------
#
	if ( !empty($HTTP_POST_VARS['username']) || !empty($HTTP_GET_VARS['username']) )
	{
		$this_userdata = ( !empty($HTTP_POST_VARS['username']) ) ? get_userdata($HTTP_POST_VARS['username'], true) : get_userdata($HTTP_GET_VARS['username'], true);



#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
and for addon
login.php

Code: Select all

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

			message_die(GENERAL_MESSAGE, $message);
		}
	}
	else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )

#
#-----[ BEFORE, ADD ]------------------
#
			//
			// CC IP-mod (wrong username - admin = 3)
			//
			if($board_config['cc_log_on'])
			{
				cc_ip_log($userdata, '', $user_ip, PAGE_LOGIN, 3, 0);
			}

#
#-----[ FIND ]------------------------------------------
#
						message_die(CRITICAL_ERROR, "Couldn't start session : login", "", __LINE__, __FILE__);
					}
				}
				else
				{

#
#-----[ AFTER, ADD ]------------------
#
			//
			// CC IP-mod (wrong password - admin = 4)
			//
			if($board_config['cc_log_on'])
			{
				cc_ip_log($userdata, '', $user_ip, PAGE_LOGIN, 4, 0);
			} 
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Post by Ricky_Racer »

Isn't this it ? I have several mods on mine, last visit, topic in who is online, bots mod, and these are lines 249 - 252 in my ./includes/sessions.php file

Code: Select all

	setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
	$SID = 'sid=' . $session_id;
	return $userdata;
}
As for admin/admin_user_ban.php, it's near the very beginning of the file (lines 34 - 50)

Code: Select all

// Start program
//-- begin replacement : - mod - codecrush ip log ------------------------------
// if ( isset($HTTP_POST_VARS['submit']) )
if ( isset($HTTP_POST_VARS['submit']) || isset($HTTP_GET_VARS['submit']) )
//-- end replacement : - mod - codecrush ip log --------------------------------
{
	$user_bansql = '';
	$email_bansql = '';
	$ip_bansql = '';
	$user_list = array();
//-- begin replacement : - mod - codecrush ip log ------------------------------
//	if ( !empty($HTTP_POST_VARS['username']) )
//	{
//		$this_userdata = get_userdata($HTTP_POST_VARS['username'], true);
	if ( !empty($HTTP_POST_VARS['username']) || !empty($HTTP_GET_VARS['username']) )
	{
		$this_userdata = ( !empty($HTTP_POST_VARS['username']) ) ? get_userdata($HTTP_POST_VARS['username'], true) : get_userdata($HTTP_GET_VARS['username'], true);
//-- end replacement : - mod - codecrush ip log --------------------------------
again I have some other mods install, so my line numbers may not match but, 157 - 160 in my login.php file

Code: Select all

			message_die(GENERAL_MESSAGE, $message);
		}
	}
	else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )
sauron99@gmail.com
Registered User
Posts: 1
Joined: Thu Sep 14, 2006 8:34 pm

Post by sauron99@gmail.com »

Great mod. Works great with phpBB v2.0.21.

I had a few problems installing this addon with a fresh phpbb 2.0.21 install. I was unable to install with easymod or ccip_install.php. Errored out on both. I had to install manually.

This code may help someone if they need to do a manual install. (from line #254 of ccip_install.txt) I was unable to find an exact match so this is where i put the code snippit.

File sessions.php (line 385)

Code: Select all

					setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
				}

				// Add the session_key to the userdata array if it is set
				if ( isset($sessiondata['autologinid']) && $sessiondata['autologinid'] != '' )
				{
					$userdata['session_key'] = $sessiondata['autologinid'];
				}

				return $userdata;
			}
			//
			// CC IP MOD: session existed, but IP missmatch
			//
			if($board_config['cc_log_on'])
			{
				cc_ip_log($userdata, '', $user_ip, $thispage_id, 0, 2);
			}
Blisk
Registered User
Posts: 270
Joined: Wed Aug 20, 2003 10:43 am
Location: Slovenia

Post by Blisk »

Ok here are my files, which was a problem of installation!
Files
wjfisherjr
Registered User
Posts: 1
Joined: Wed Sep 13, 2006 4:12 pm

Post by wjfisherjr »

I have installed this mod looks good. Just one problem everytime it logs with the wrong time...Please help...

Thanks in advance
n4p1
Registered User
Posts: 13
Joined: Sun Aug 20, 2006 9:24 pm

Post by n4p1 »

Can anyone post direct link to version 0.3.2? This link in first post dosnt works..

//Ok, now its works.
angeljhouse
Registered User
Posts: 86
Joined: Wed Jul 26, 2006 5:59 am

Post by angeljhouse »

o...my god!

after installation, entre SQL and upload the all php files... i can't go to my site's admin panel!!!!!!

i am using www.awardspace.com server and phpbb version 2.0.21... when i go to admin panel...it redirect to awardspace.com website! what can i do now!!

note: at half of the installation process, it redirect to www.awardspace.com homepage...is this server can't use ip log mod??

please help!! urgent!!!!!!!!!!!!!!
Blisk
Registered User
Posts: 270
Joined: Wed Aug 20, 2003 10:43 am
Location: Slovenia

Post by Blisk »

This file admin_ip_log_bat.php is NOT compatibile with PHP5.
After I update PHP4 to PHP5 can not acess anymore ACP it is white blank page.
After delete this file admin_ip_log_bat.php
I can acess ACP again.
can someone fix this file?
Zinedine_Zidane
Registered User
Posts: 1
Joined: Sat Jul 29, 2006 7:15 pm
Contact:

Post by Zinedine_Zidane »

Thanks , it's excellent ! Great :D
User avatar
soadlink
Registered User
Posts: 39
Joined: Thu Jun 26, 2003 1:29 am

Post by soadlink »

I'm having a problem: I installed it, it shows up in the admin panel, everything seems fine, no errors during install, but it simply doesnt log IPs.

I've been watching it, and there have been no ips logged. But yes, it is turned on. However, there are no IPs in the logs.

I figured it would even log my own ips :? Anyone got suggestions?

Edit: I used the ccip_install.php to install if that matters, no errors during that
User avatar
Roks
Registered User
Posts: 119
Joined: Thu Sep 14, 2006 1:15 am

Post by Roks »

Thanks for the MOD, look cool in the Screenshots.
User avatar
SommerNyte
Registered User
Posts: 383
Joined: Thu Jan 22, 2004 7:34 am

Post by SommerNyte »

Two questions:

(1) How can I look up IP records of users with a "*" in their username? If I try, I get no results.

(2) Is there a way to get flags or reports on a username being used by varying IP addresses? It only seems to give me IPs that have been used by multiple usernames, but I'd like to see usernames that have multiple IPs.

Thanks!
Darlantan
Registered User
Posts: 369
Joined: Wed Mar 13, 2002 1:37 pm

Post by Darlantan »

I've made available for download the "development version" of my rewritten Log System - version 0.4.1 (see first post). It hasn't changed much since August, and been running on 3 different sites as of then.
I was hoping to root out an issue where for some users the log-session-duration setting is disregarded, causing the log to be cluttered with entries of them browsing the forums. But through all my testing it seems to me to be an issue caused by their connection(-settings), or possibly a proxy. Hard to workaround - so for now we'll just have to put up with it, or exclude the user from being logged.

Download version 0.4.1 - CodeCrush Log System
NOTE: There is no upgrade path from 0.3.x to 0.4.1

Changed in 0.4.1
- large rewrite
- XSS bug fixed
- IP-Country flags
- Action logging (ACP, "moderations", errors..)
- Backups, Statistics and CSV-exports have been stripped (for now)
- Even simpler installation
- Name Change! CodeCrush IP Log -> CodeCrush Log System (to reflect changes)
- Log Config access configurable


I'm not gonna answer all questions now, sorry.
If you still have the same issues with the new version, please ask again.

SommerNyte:
1) Never thought of that. A * is translated to a wildcard before the db-query. But that should still work. I.e. if you have a user "kris" and a user "kr*s", then a search for "kr*s" :should: match both. However I have not tested this.
2) No such flag/report yet. On a big log-table such a call could take :time:
An approach to your question using the new logs could be to log last-connected-from-ip somewhere and generate a warning each time this value changes. It'd be alot of warnings for normal forums though. And it could generate quite an overhead on heavy-traffic boards.
Amailer
Registered User
Posts: 105
Joined: Fri Aug 22, 2003 11:03 pm
Location: www.AaronDM.com
Contact:

Post by Amailer »

Did you remove the "Multiple users from the same computer" feature?
>> New AaronDM - Help with phpBB Setups, Mods or more? Contact me!
>> Visit Compsci - For all students interested in computer science.
Post Reply

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