Viel Spass beim Testen...
Gruss
Code: Alles auswählen
----------------------------------------------------------------
#################################################################
## Installation Level: Easy.
## Installation Time: 15 Minutes
## Files To Edit: 2
## Included Files: 0
## Author: sirco [info@svens.net]
#################################################################
##
## IMPORTANT NOTE !!!!
##
## This Decription is based on the PageCounter
## Daily Counter 1.1 from Chi Kien Uong
## You Have to Download the counter script first at :
## http://www.proxy2.de/download.php?file=dcountphp.zip
##
## * ----------------------------------------------
## * Daily Counter 1.1
## * Copyright (c)2001 Chi Kien Uong
## * URL: http://www.proxy2.de
## * ----------------------------------------------
## The Counter is Distributed under the GNU Software License
##
#################################################################
1. download the Counter Script as stated above , and Extract it.
2. Read the Installation Instructions, and make a Testinstallation on your server. (I think the Best is to use The Counter in Textmode, you can also use it in MySQL mode, but I think its not neccesary. Maybe If you have a board with a lot of Traffic, It could be, then it makes sence to use the SQL function)
Basicly you have to do the following.
[only TextFile Mode is described here]
2.1. Modify the config.inc.php that it fits your needs
You have to set:
--------------------------------------------------
$COUNT_CFG["use_db"] = false;
/* config */
$COUNT_CFG["block_time"] = 3600; /* sec */
$COUNT_CFG["offset"] = 0;
/* textfile settings : Set them
/*HERE You have to change the directory statements, when you have the storage Files in the PhpBB directory directly.*/
$COUNT_CFG["logfile"] = "./ip.txt";
$COUNT_CFG["counter"] = "./total_visits.txt";
$COUNT_CFG["daylog"] = "./daily.txt";
--------------------------------------------------
2.2. Upload The Following Files from the Script in the Directory
where PhpBB is installed:
counter.class.php
config.inc.php
visitors.php
demo.php
ip.txt
total_visits.txt
daily.txt
2.2. Chmod these files:
visitor.php - 755
ip.txt - 666
daily.txt - 666
total_visits.txt - 666
2.3. Test with the Demo.php If your installed Script works
If so, The Demo.php should Show the following:
*****************************************
Daily Counter - PHP Version
- Hit Reload -
Thu, 22 August 2002
Total Visits: 1
Visitors today: 1
*****************************************
Congratulation: Your Counter Script Installation is Working
--------------------------------------------------
NOW WE INTEGRATE THE COUNTER INTO THE PHPBB BOARD:
--------------------------------------------------
Make a copy of all Original Files you change
#####
## We have to Change the Following Files of PhpBB
#####
index.php
Templates/[usedTemplate]/index_body.tpl
Do the Following:
#
# ------[ OPEN: Index.php ]--------------
#
#
# ------[ FIND: ]--------------
#
define('IN_PHPBB', true);
#
#-----[ BEFORE, ADD ]-----------------------------------
#
include ("./config.inc.php");
include ("./counter.class.php");
$counter = new dcounter();
$visits = $counter->show_counter(); /* Returns an associative array */
#
# ------[ FIND: ]--------------
# $template->assign_vars(array(
'L_FORUM' => $lang['Forum'],
'L_TOPICS' => $lang['Topics'],
#
#-----[ BEFORE, ADD ]-----------------------------------
#
'TODAYCOUNT' => $visits['visits_today'],
'TOTALCOUNT' => $visits['total'],
#
# ------[ OPEN: ]--------------
#
Template/[TemplateYouUse]/index_body.tpl
#
# ------[ FIND: ]--------------
#
Find the Place where you want to have the Counter be Displayed.
Forexample directly in the Headtable after:
<!-- END switch_user_logged_in -->
</span></p>
#
# -------[AFTER ADD] -------------
#
<span class="smalltext">Total Visits: {TOTALCOUNT}<br>
Visitors today: {TODAYCOUNT}</span><br>
#
#-----[ SAVE/CLOSE ALL FILES ]-----------------------------------
#
Upload the Files, and Test it.
Maybe replace the {TODAYCOUNT} and {TOTALCOUNT}
Wherever you want to have them in Your templates.
Every Visitor is only Counted once when he enters into PHPBB.
If the same Visitor with the Same IP visits again he wont be counted at the same day.
##### Have Fun, Enjoy PHPBB... ####