Welcome! Please Login or Register!
June 03, 2020, 05:48:09 AM
Home Login Register
pftq Forums  |  Software and Scripts  |  Other Scripts and Tools  |  Replacing existing counter in .tpl file plus start value. 0 Members and 1 Guest are viewing this topic. « previous next »
Latest News!VR Jetpack Game Trailer and Music(Jul 29, 2019)
Pages: [1] Print
Author Topic: Replacing existing counter in .tpl file plus start value.  (Read 2861 times)
Danwest
Member
*****
Offline Offline

Posts: 1

« on: February 12, 2012, 05:25:36 AM »

Hello,

pq Visitor Counter and Tracker looks like an excellent script, thank you making it available.

My website consists of php pages that include tpl pages (no htm pages) and I already am using a counter that I am looking at replacing with pqVisitor.

My current counter is in a file called wrapper.tpl

Code:
include('/mycompletepath/counter/counter.php');
that forms each page so from what I could tell that is where I would need to put
Code:
<?php include("/mycompletepath/pqcounter/counter.php"); ?>
even though it might not be at the top of the file?

My counter since it started is at over 60,000 total visitors, is there a start value that can be set during the install or would I have to manually edit the start value in the database after it is installed?

Another quick question, regarding the configuration of counter.php. For the line
Code:
$duration = 4*7*24*60*60; // seconds before IP Address is counted as a new visitor again

I don't want them to be counted as a new visitor until either the next day or a 24 hour period, do I just remove everything other than 24 so it looks like this?
Code:
$duration = 24; // seconds before IP Address is counted as a new visitor again

Thank You
Dan

« Last Edit: February 12, 2012, 06:51:34 AM by Danwest » Logged
pftq
Administrator
*****
Offline Offline



Posts: 4128

WWW
« Reply #1 on: February 12, 2012, 01:29:19 PM »

Hi, you'd have to just manually edit the value in your MySQL database (not really hard, just open the table up in PHPAdmin or similar and edit the value).

The include doesn't have to be at the top of the file.

For the 24-hr period, notice the setting is in seconds.  So you'd have to do 24*60*60 (#hrs * min * sec).
Logged
Pages: [1] Print 
pftq Forums  |  Software and Scripts  |  Other Scripts and Tools  |  Replacing existing counter in .tpl file plus start value. « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines | RSS Feed Valid XHTML 1.0! Valid CSS!
Page created in 0.265 seconds with 21 queries.