function google_analytics_counter_construct_content in Google Analytics Counter 6.2
Same name and namespace in other branches
- 6 google_analytics_counter.module \google_analytics_counter_construct_content()
- 7 google_analytics_counter.module \google_analytics_counter_construct_content()
2 calls to google_analytics_counter_construct_content()
File
- ./
google_analytics_counter.module, line 494
Code
function google_analytics_counter_construct_content($sumarray) {
$result = '';
$sum_of_pageviews = '';
#$sum_of_pageviews .= '<span style="font-size:large;"';
#$sum_of_pageviews .= ' title="';
// If debugger is on, and if the user has admin rights for Google Analytics Counter.
if (user_access('administer google analytics counter')) {
$debuggeron = GOOGLE_ANALYTICS_COUNTER_DEBUG;
if ($debuggeron == 1) {
$titlemsg = $sumarray[3];
}
}
#$sum_of_pageviews .= $titlemsg;
#$sum_of_pageviews .= '">';
$sum_of_pageviews .= $sumarray[0];
#$sum_of_pageviews .= '</span>';
//$countdays = $sumarray[1];
//$cachedago = time()-$sumarray[2];
if ($sumarray[0] == 0 and $debuggeron != 1) {
// If $sumarray[2] is zero, it means nothing was fetched (cache expired but there was concurrency and new data could not be retrieved). We will return nothing -- until new value can be retrieved.
//$result = '***'.$countdays.'***';
$result = '';
}
else {
$result .= $sum_of_pageviews;
// If debugger is on, and if the user has admin rights for Google Analytics Counter.
if (user_access('administer google analytics counter')) {
if ($debuggeron == 1) {
$result .= '<br/><font color="teal">' . $titlemsg . '</font>';
}
}
}
return $result;
}