public function counterize_check_data_traffic($data)
 {
     //<!-- counterize_stats_hits --> : Shows a table containing statistics about hits
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_hits\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_get_hits'), 0);
     return $data;
 }
 public function counterize_check_data_browsers($data)
 {
     //<!-- counterize_stats_browsers_nb --> : Shows a list of the nb most used browsers (with their version)
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_browsers_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_used_browsers'), 1);
     //<!-- counterize_stats_browsers_nover_nb --> : Shows a list of the nb most used browsers (without their version)
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_browsers_nover_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_used_browsers_without_version'), 1);
     //<!-- counterize_stats_browsers_mixed_nb1_nb2 --> : Shows a list of the nb1 most used browsers (clicking each entry will show the version details)
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_browsers_mixed_([0-9]+)_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_used_browsers_collapsible'), 2);
     return $data;
 }
Beispiel #3
0
function counterize_filter_callback($data)
{
    //search if the post has the magic word
    $pattern = '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats/';
    if (preg_match($pattern, $data)) {
        //we probably want to add some statistics. Lets verify:
        //<!-- counterize_stats --> : Shows all the stats
        $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats\\s*\\-(\\-\\>|\\#)/', 'counterize_showStats', 0);
        //<!-- counterize_stats_copyright --> : Shows a small copyright notice
        $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_copyright\\s*\\-(\\-\\>|\\#)/', 'counterize_copyright', 0);
        //let plugins to add their own charts
        $data = apply_filters('counterize_check_data', $data);
    }
    return $data;
}
 public function counterize_check_data_pages($data)
 {
     //<!-- counterize_stats_urls_nb --> : Shows a list of the nb most requested URLs
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_urls_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_requested_urls'), 1);
     //<!-- counterize_stats_urls_24hrs_nb --> : Shows a list of the nb most requested URLs during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_urls_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_requested_urls24hrs'), 1);
     //<!-- counterize_stats_posts_nb --> : Shows a list of the nb most popular posts/pages
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_posts_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_popular_posts'), 1);
     //<!-- counterize_stats_posts_24hrs_nb --> : Shows a list of the nb most popular posts/pages during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_posts_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_popular_posts24hrs'), 1);
     return $data;
 }
 public function counterize_check_data_keywords($data)
 {
     //<!-- counterize_stats_keywords_nb --> : Shows a list of the nb most searched keywords
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_keywords_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_searched_keywords'), 1);
     //<!-- counterize_stats_keywords_today_nb --> : Shows a list of the nb most searched keywords today
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_keywords_today_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_searched_keywords24hrs'), 1);
     return $data;
 }
 public function counterize_check_data_ip($data)
 {
     $enable_hostname_lookup = counterize_get_option('enable_hostname_lookup');
     //<!-- counterize_stats_ip_nb --> : Shows a list of the nb most active ips
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_ip_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_active_ips'), 1);
     //<!-- counterize_stats_ip_24hrs_nb --> : Shows a list of the nb most active ips during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_ip_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_active_ips24hrs'), 1);
     if ($enable_hostname_lookup) {
         //<!-- counterize_stats_ip_nb --> : Shows a list of the nb most active ips
         $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_hosts_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_active_hosts'), 1);
         //<!-- counterize_stats_ip_24hrs_nb --> : Shows a list of the nb most active ips during the last 24 hours
         $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_hosts_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_active_hosts24hrs'), 1);
     }
     return $data;
 }
 public function counterize_check_data_outlinks($data)
 {
     //<!-- counterize_stats_outlinks_nb --> : Shows a list of the nb most clicked outlinks
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_outlinks_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_clicked_outlinks'), 1);
     //<!-- counterize_stats_outlinks_24hrs_nb --> : Shows a list of the nb most clicked outlinks during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_outlinks_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_clicked_outlinks24hrs'), 1);
     //<!-- counterize_stats_exitpages_nb --> : Shows a list of the nb most frequent exit pages
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_exitpages_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_exit_pages'), 1);
     //<!-- counterize_stats_exitpages_24hrs_nb --> : Shows a list of the nb most frequent exit pages during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_exitpages_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_exit_pages24hrs'), 1);
     return $data;
 }
 public function counterize_check_data_referers($data)
 {
     //<!-- counterize_stats_referers_nb --> : Shows a list of the nb most seen referers
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_referers_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_seen_referers'), 1);
     //<!-- counterize_stats_referers_24hrs_nb --> : Shows a list of the nb most seen referers during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_referers_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_seen_referers24hrs'), 1);
     //<!-- counterize_stats_domains_nb --> : Shows a list of the nb most seen refering domains
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_domains_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_seen_referers_domains'), 1);
     //<!-- counterize_stats_domains_24hrs_nb --> : Shows a list of the nb most seen refering domains during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_domains_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_seen_referers_domains24hrs'), 1);
     return $data;
 }
 public function counterize_check_data_countries($data)
 {
     //<!-- counterize_stats_countries_nb --> : Shows a list of the nb most visiting countries
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_countries_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_visiting_countries'), 1);
     //<!-- counterize_stats_countries_24hrs_nb --> : Shows a list of the nb most visiting countries during the last 24 hours
     $data = counterize_check_data($data, '/(\\<\\!\\-|\\#)\\-\\s*counterize_stats_countries_24hrs_([0-9]+)\\s*\\-(\\-\\>|\\#)/', array(&$this, 'counterize_render_most_visiting_countries24hrs'), 1);
     return $data;
 }