PPhlogger is a very powerful statistics tool
With this integration u'll be able see your visitors usernames in the PPhlogger's statistics and also you'll be able search by user id or user name in the statistics too.
------------- [ Installation ] -------------Step 1Backup these files:
From
PPlogger dir:
pphlogger.php
dspLogs.php
config.inc.php
include/pphlogger.js
include/loglist.inc.php
libraries/search_func.lib.php
mysql/pphl_xxxxx_logs.sql[/list]
From 4images dir:
includes/page_header.php
pphlogger.js (this file might be located in different place, depence how u call your pphlogger script to log visitors) templates/<yourtemplate>/header.html or another template where u add call your pphloogger script[/list]
Step 2Download package for your PPhlogger version:
v2.2.4 or
v2.2.5Step 3Unzip it and upload all files into pphlogger dir, overwrite the old files.
Step 4Edit
config.inc.php There are 2 new settings for 4images.
Step 5If u have not yet install pphlogger, then just install it, all needed db changes will be included in the installation.
If u have installed it, then add two fields into pphlogger database (execute those commands in your mysql manager):
NOTE Replace
xxxxx with your user ID (not user name, u can find it from ADMIN panel, or from pphlogger database)
ALTER TABLE `pphl_xxxxx_logs` ADD `user_id` MEDIUMINT( 8 ) NOT NULL;
ALTER TABLE `pphl_xxxxx_logs` ADD `user_name` VARCHAR( 255 ) NOT NULL;
Step 6Login into to your pphlogger with your username (not admin panel), go to "settings" and redownload pphlogger.js file, replace your old one.
Step 7Open
includes/page_header.php Find:
"site_name" => $config['site_name'],
Insert
below:
"current_user_id" => $user_info['user_id'],
"current_user_name" => ($user_info['user_level'] == GUEST) ? $lang['userlevel_guest'] : addslashes($user_info['user_name']),
Step 8Open
templates/<yourtemplate>/header.html or
footer.html, the one where u add pphloger loggin script.
replace your loggin script with this one:
<script language="JavaScript">var user_id='{current_user_id}';var user_name='{current_user_name}';</script>
<script language="JavaScript" type="text/javascript" src="pphlogger.js"></script>
<noscript><img alt="" src="../log/pphlogger.php?id=81312&st=img&user_id={current_user_id}&user_name={current_user_name}"></noscript>
Adopt it to your settings
P.S.
- when user is online (online time u can set from settings) the username is shows in green color.
- when user logged out, and continue browse the site, hes username wont be replaced with "Guest" in the logs.
- when user logged out and then login with different username, the log will show current username.