You are here

function __getclicky_output_stats_dashboard in Clicky - Web Analytics in Real Time 8

Same name and namespace in other branches
  1. 6 getclicky.module \__getclicky_output_stats_dashboard()
  2. 7 getclicky.module \__getclicky_output_stats_dashboard()

Insert an iframe with the getclicky stats for the current account.

1 string reference to '__getclicky_output_stats_dashboard'
getclicky_menu in ./getclicky.module
Implements hook_menu().

File

./getclicky.module, line 244

Code

function __getclicky_output_stats_dashboard() {
  $site_id = trim(variable_get('getclicky_site_id_number', ''));
  $site_key = trim(variable_get('getclicky_site_key_number', ''));
  if ($site_id && $site_key) {

    // 1000x1300 seems to be a sweet spot for avoiding inner pane scrolling
    $iframe = '<iframe style="border: none; width: 1000px; height: 1300px;" src="http://getclicky.com/stats/wp-iframe?site_id=' . $site_id . '&sitekey=' . $site_key . '"></iframe>';
  }
  else {
    $iframe = t("You have not configured your GetClicky account, please !configure_link ...", array(
      '!configure_link',
      l('enter site id and sitekey', 'admin/config/system/getclicky'),
    ));
  }
  return $iframe;
}