The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Calculating averages problem
I have run into a wall here. I am trying to calculate the averages for site visits. I have done it exactly like the average threads and posts but for some reason it is way off. Here is what I am using:
Code:
$pagehits_counter = $vbulletin->boofocounter; $starttime = (TIMENOW - $vbulletin->options['site_lifestatus_startupdate']); $starthour = $starttime / 3600; $pagehits_hourly = vb_number_format($pagehits_counter / $starthour, 2); $startday = $starttime / 86400; $pagehits_daily = vb_number_format($pagehits_counter / $startday, 2); The hourly pagehits should be around 48.?? but it is showing up as 0.05. Can anyone spot what I am doing wrong or what is missing? --------------- Added [DATE]1275380790[/DATE] at [TIME]1275380790[/TIME] --------------- I figured out what I was doing wrong. I forgot to add strtotime to the code. All is working now. I must be losing it in my old age to overlook something so simple. I'm ready to be punished now. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|