You are here

function visitors_block_since_date in Visitors 7.0

Same name and namespace in other branches
  1. 8 visitors.block.inc \visitors_block_since_date()
  2. 7.2 visitors.block.inc \visitors_block_since_date()
  3. 7 visitors.block.inc \visitors_block_since_date()

Display the start date statistics to visitors block.

Parameters

$list_items: array associative array of variables, use for theme function

1 call to visitors_block_since_date()
theme_visitors_block_view in ./visitors.block.inc
Implement a theme function for block output.

File

./visitors.block.inc, line 148
Display current visitor block.

Code

function visitors_block_since_date(&$list_items) {
  if (variable_get('visitors_since_date', 1)) {
    $query = 'SELECT visitors_date_time
      FROM {visitors}
      ORDER BY visitors_date_time ASC';
    $since_date = db_query_range($query, 0, 1)
      ->fetchField();
    $list_items[] = t('Since: %since_date', array(
      '%since_date' => format_date($since_date, 'short'),
    ));
  }
}