Plugin Directory

Count per Day

Arbitrary section

Functions

You can place these functions in your template.
Place functions within post-loop (e.g. in single.php)
Use '<?php if(method _ exists($count _ per _ day, "show")) $count _ per _ day->show(); ?>' to check if plugin is activated.

'show( $before, $after, $show, $count )'

  • $before = text before number e.g. '<p>' (standard "")
  • $after = text after number e.g. 'reads</p>' (standard " reads")
  • $show = true/false, "echo" complete string or "return" number only (standard true)
  • $count = true/false, false will not count the reads (standard true)

'count()'

  • only count reads, without any output
  • cpdShow call it

'getFirstCount()'

  • shows date of first count

'getUserPerDay( $days )'

  • shows average number of visitors per day of the last $days days
  • default on dashboard (see it with mouse over number) = "Latest Counts - Days" in options

'getUserAll()'

  • shows number of total visitors

'getUserOnline()'

  • shows number of visitors just online

'getUserToday()'

  • shows number of visitors today

'getUserYesterday()'

  • shows number of visitors yesterday

'getUserLastWeek()'

  • shows number of visitors last week (7 days)

'getUserPerMonth()'

  • lists number of visitors per month

'getUserPerPost( $limit = 0 )'

  • lists $limit number of posts, -1: all, 0: get option from DB, x: number

'getMostVisitedPosts( $days, $limits )'

  • shows a list with the most visited posts in the last days
  • $days = days to calc (last days), 0: get option from DB
  • $limit = count of posts (last posts), 0: get option from DB

'getClients()'

  • shows visits per client/browser in percent
  • clients are hardcoded in function but easy to change ;)

GeoIP

  • With the GeoIP addon you can associate your visitors to an country using the ip adress.
  • In the database a new column 'country' will be insert on plugin activation.
  • On options page you can update you current visits. This take a while! The Script checks 100 IP adresses at once an reload itself until less then 100 adresses left. Click the update button to check the rest.
  • If the rest remains greater than 0 the IP adress is not in GeoIP database (accuracy 99.5%).
  • You can update the GeoIP database from time to time to get new IP data. This necessitates write rights to geoip directory (e.g. chmod 777).
  • If the automaticaly update don't work download GeoIP.dat.gz and extract it to the "geoip" directory.
  • More information about GeoIP on http://www.maxmind.com/app/geoip_country

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus (1 reporting)

100%
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1 100,1,1

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(7 ratings)