function statcounter_display in StatCounter 5
Same name and namespace in other branches
- 6 statcounter.module \statcounter_display()
Check to see if the StatCounter code should be added to the page.
1 call to statcounter_display()
- statcounter_block in ./
statcounter.module - Implementation of hook_block().
File
- ./
statcounter.module, line 94 - Provides an integration with StatCounter which logs user activity.
Code
function statcounter_display() {
if (variable_get('statcounter_code', '') != '') {
switch (variable_get('statcounter_scope', 'home')) {
case 'all':
return TRUE;
case 'user':
return strpos(substr(statcounter_get_url(), 0, 5), 'admin') === FALSE;
case 'admin':
return strpos(substr(statcounter_get_url(), 0, 5), 'admin') !== FALSE;
case 'home':
return statcounter_get_url() == 'home';
}
}
return FALSE;
}