Welcome! Please Login or Register!
July 26, 2024, 10:01:24 PM
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!Lunar Trigger(Aug 27, 2023)
Pages: [1] Print
Author Topic: Replacing existing counter in .tpl file plus start value.  (Read 5294 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: 4202

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.064 seconds with 21 queries.