You are here

function statcounter_block in StatCounter 5

Same name and namespace in other branches
  1. 6 statcounter.module \statcounter_block()

Implementation of hook_block().

File

./statcounter.module, line 72
Provides an integration with StatCounter which logs user activity.

Code

function statcounter_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks = array();
      $blocks[0]['info'] = t('StatCounter');
      return $blocks;
    case 'configure':
      return array();
    case 'save':
      return;
    case 'view':
    default:
      if (statcounter_display()) {
        $block = array();
        $block['content'] = variable_get('statcounter_code', '');
        return $block;
      }
  }
}