We have already had nearly 8,000 hits and it is automatically showing 2890 - where do you edit this?
<div id="blockStyle193Main20" class=" ccm-block-styles"> 0002996</div>
Is this any help, I've done a search in our admin site for different bits of this path but nothing comes up....
See attached image.
The tracker should be tracking unique visits to the page it is located on.
The numbers will not line up. The counter will be more accurate
*0407 624 650*
On 7 December 2011 10:24, Concrete5 Community
should reflect a number closer to your expectations:
// change this // return $db->GetOne("select count(pstID) from PageStatistics where cID = ?", array($cID)); // to this return $db->GetOne("select count(pstID) from PageStatistics where cID > 0", null);
Swapping the 'cID' condition to all positive numbers aggregates all page hits per query, and the 'null' discards the passed pageID.
Like @tallacman pointed out, the block pulls from the 'PageStatistics' table, where each line item is timestamped and associated with an individual page, so modifying the table to inflate your statistics would probably skew your actual stats as reported by the dashboard. Doubtless a small script to loop an insert with dummy data would accomplish it, but to go that route simply to change the display seems a bit much.
If you really must massage your displayed numbers after making the change, find the difference between your target number and the displayed number (ie. actual hits = 3000, desired = 8000; difference = 5000), and plug into the following modification of the file
after line 3, where the value of $count is assigned:
$count = ($count + 5000);
This ought to pad your number to a value closer to what you expect, without tampering with the actual stats available to you via the dashboard.
excellent post, thank you.
However the second part
$count = ($count + 5000);
is silently ignored in my case...
Maybe there is another copy of view.php (and not /packages/page_hit_counter/blocks/page_hit_counter/view.php) that needs to be altered ?!?
Anyway, I solved it by altering the same file as in part one (i.e. /packages/page_hit_counter/models/counter.php ) and add the "bonus" here, as follows:
return ($db->GetOne("select count(pstID) from PageStatistics where cID > 0", null) + 5000);
Can you see any problems with that?
*0407 624 650
**Be the change - how do YOU want it to be?*
Create or upgrade your website -
We use *www.accessall.com.au* - *keeping up with change**
On 25 May 2012 00:12, concrete5 Community <[email protected]>wrote: