oki... but i'm use this only for experimental...
add first .. a frontend demo screen and download of the package are under this url:
http://www.digimade.de/index.php?id=14,31,0,0,1,0
two screenshots from the backend are also located under this url!
this short tut is based on an articel from vano @ 4homepages:
http://4homepages.de/forum/viewtopic.php?t=7540
a) 4images part
1. Backup these files 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
2. Download modified package for pphlogger
v2.2.5
3. Unzip it and upload all files into your favorite dir.
4. Edit config.inc.php There are 2 new settings for 4images.
5. If 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) Code:
Code: Select all
ALTER TABLE `pphl_xxxxx_logs` ADD `user_id` MEDIUMINT( 8 ) NOT NULL;
ALTER TABLE `pphl_xxxxx_logs` ADD `user_name` VARCHAR( 255 ) NOT NULL;
6. Login into to your pphlogger with your username (not admin panel), go to "settings" and redownload pphlogger.js file, replace your old one.
7. Open /includes/page_header.php
Find:
Code: Select all
"site_name" => $config['site_name'],
add after:
Code: Select all
"current_user_id" => $user_info['user_id'],
"current_user_name" => ($user_info['user_level'] == GUEST) ? $lang['userlevel_guest'] : addslashes($user_info['user_name']),
8. Open /templates/<yourtemplate>/header.html or footer.html, the one where u add loggin script.
replace your loggin script with this one:
Code: Select all
<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 your settings ...
b) wcms part
for user logging in wcms open index.php & find:
Code: Select all
<!--
phpwcms | open source web content management system
add before:
Code: Select all
<script language="JavaScript" type="text/javascript" src="pphlogger.js"></script>
<noscript><img alt="" src="http://your_own_pfad/pphlogger/pphlogger.php?id=username_here&st=img"></noscript>
for show the log's in frontend .. create a new articel an add this html-code as example:
Code: Select all
<body>
<table width="60%" border="0">
<tr>
<td><p> </p>
<p>description:<br>
</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>hits:</td>
<td>zeigt alle Hits an</td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=hits"></script>
</strong></td>
</tr>
<tr>
<td>pageviews:</td>
<td>zeigt alle Pageimpressions an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=pageviews"></script>
</strong></td>
</tr>
<tr>
<td>today: </td>
<td>zeigt heutige Hits an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=today"></script>
</strong></td>
</tr>
<tr>
<td>todayviews:</td>
<td>zeigt heutige Pageimpressions an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=todayviews"></script>
</strong></td>
</tr>
<tr>
<td>yesterday:</td>
<td>zeigt gestrige Hits an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=yesterday"></script>
</strong></td>
</tr>
<tr>
<td>yesterdayviews:</td>
<td>zeigt gestrige Pageimpressions an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=yesterdayviews"></script>
</strong></td>
</tr>
<tr>
<td>month:</td>
<td>zeigt Hits dieses Monats an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=month"></script>
</strong></td>
</tr>
<tr>
<td>monthviews:</td>
<td>zeigt Pageimpressions dieses Monats an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=monthviews"></script>
</strong></td>
</tr>
<tr>
<td>onlineusr:</td>
<td>zeigt aktuell anwesende Besucher an<br></td>
<td><strong>
<script language="JavaScript" type="text/javascript" src="http://your_own_pfad/pphlogger/showhits.php?id=username_here&st=js&type=onlineusr"></script>
</strong></td>
</tr>
</table>
this will show a table like this:
i'm very happy when anyone can integrate this in the wcms-backend area!
i hope i can help you & sorry for my bad english...
by
jkn
p.s. read the pphlogger docu for integrate your own "Short query" in pphlogger admin area
for example: