Count per Day

“Count per Day” ist ein einfacher Besucherzähler.

Die Seitenaufrufe werden pro Artikel gespeichert. Dabei wird als “Reload-Sperre” nur ein Aufruf pro IP-Adresse und Tag berücksichtigt.

Beispiel: Wenn ein Leser 5 Artikel ansieht, sind alle “1 mal gelesen”, aber der Gesamtzähler erkennt, dass es nur ein Besucher war.

Die Aufrufe können pro Artikel angezeigt werden. Im Admin-Bereich gibt es weitere Statistiken.

Download bei WordPress

Count per Day 2.9

Contributors: Tom Braider
Donate link: http://www.unicef.org
Tags: counter, count, posts, visits, reads, dashboard, widget
Requires at least: 2.7
Tested up to: 2.9.2
Stable tag: 2.9

Visit Counter, shows reads per page, visitors today, yesterday, last week, last months and other statistics.

Description

  • count reads and visitors
  • shows reads per page
  • shows visitors today, yesterday, last week, last months and other statistics on dashboard
  • you can show these statistics on frontend (e.g. on sidebar) too
  • if you use Wordpress < 2.7 please use Count-per-Day v1.4

It counts 1 visit per IP per day. So any reload of the page don't increment the counter.

Languages: english, german, italian, portuguese, belorussian, uzbek

Installation

  1. unzip plugin directory into the /wp-content/plugins/ directory
  2. activate the plugin through the Plugins menu in WordPress

First activation will create the 2 tables wp _ cpd _ counter and wp _ cpd _ counter _ useronline.

Configuration

See the Options Page and check the default values. It's easy. :)
Install optional GeoIP database to show countries of your visitors.

If "Auto counter" is on reads on single-posts and pages will count without any changes on template.

For more informations see "Other Notes".

Frequently Asked Questions


Need Help? Find Bug?

read and write comments on plugin page

Screenshots


  1. 1. Statistics on Count-per-Day Dashboard

  2. 2. Options

  3. 3. Widget sample

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. Without spaces " " near _ .

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
getReadsAll()
  • shows number of total reads

getReadsToday()
  • shows number of reads today

getReadsYesterday()
  • shows number of reads yesterday

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


Changelog


2.9

  • New: little note system to mark special days
  • New: functions to get reads/page views total, today and yesterday
  • Language update: Italian thanks to Gianni Diurno http://gidibao.net/index.php/portfolio
  • Language update: Portuguese (Brazil) thanks to Lucato http://www.ilucato.com.br
  • Language update: Swedish thanks to Magnus Suther http://www.magnussuther.se
  • Language update: Dansk thanks to Jonas Thomsen http://jonasthomsen.com
  • Language update: German

2.8

  • New: set user level until CpD will count loged users
  • New: link to plugin page on Count per Day dashboard
  • New: click on a bar in the charts reload the page with given date for Visitors per day metabox
  • New language: Swedish, thanks to Magnus Suther http://www.magnussuther.se
  • New language: Dansk, thanks to GeorgeWP http://wordpress.blogos.dk

2.7

  • Bugfix: date/timezone problem
  • New: change start date and start count on option page
  • New: "edit post" links on lists
  • New: new list shows visitors per post on user defined date
  • New: link to plugin page

2.6

  • languages files now compatible with Wordpress 2.9
  • New: improved CSS support for RTL blogs (e.g. arabic)

2.5

  • BACKUP YOUR COUNTER DATABASE BEFORE UPDATE!
  • Change: some big changes on database and functions to speed up mysql queries. This will take a while on activation!
  • New: "Mass Bot Detector" shows and deletes clients that view more than x pages per day
  • New: see count and time of queries if CPD_DEBUG

    true (on top of counter.php)
  • Bugfix: cleanDB by IP now works
  • Language update: Portuguese (Brazil), thanks to Beto Ribeiro http://www.sevenarts.com.br

2.4.2

  • Bugfix: mysql systax error
  • Bugfix: no country data was stored (GeoIP), use "Update old counter data" on options page

2.4

  • Bugfix: works with PHP 4.x again (error line 169)
  • Change: some functions now faster
  • New: GeoIP included. You have to load GeoIP.dat file on option page before you can use it.
  • Language updates: Italian (Gianni Diurno) and German

2.3.1

  • Bugfix: counter do not work without GeoIP Addon (nonexisting row country in table)

2.3

  • New: chart "visitors per day"
  • New: counts index pages: homepage, categories, tags (if autocount is on)
  • New: visits per client/browser in percent
  • New: added some parameters to functions to overwrite default values
  • New language: Usbek, thanks to Alisher

2.2

  • Change: USER_AGENT must have > 20 chars, otherwise we call it "bot"
  • New: optional GeoIP addon to show page views per country
  • see Section "GeoIP addon"

2.1

  • New: custom names on widget
  • New: function "first count" on widget
  • little changes on german translation

2.0

  • New: sidebar widget
  • New: reset button to set all counter to 0
  • New: custom number of "reads per post" on dashboard page
  • New: little chart of "reads per day" on dashboard page
  • New: reads in post and page lists (optional)
  • New: most visited posts in last days on dashboard page
  • New: recognize bots by IP address
  • New: movable metaboxes on dashboard page
  • New: clean function now deletes counter of deleted pages too
  • Bugfix: updates online counter on every load
  • Bugfix: now empty user agents/clients will not be count
  • change options to array
  • create class, update/clean up/rename functions

1.5.1

  • New language: Belorussian, thanks to Marcis Gasuns http://www.fatcow.com

1.5

  • New: Dashboard Widget
  • WP 2.7 optimized, for WP<2.7 please use CPD 1.4

1.4

  • New: uninstall function of WP 2.7 implemented
  • litle changes on layout to be suitable for WP 2.7

1.3

  • New: you can delete old data if you add a new bot string
  • Bugfix: Bot check was case-sensitive
  • New language: Portuguese, thanks to Filipe

1.2.3

  • Bugfix: autocount endless looping

1.2.2

  • New language: Italian, thanks to Gianni Diurno http://gidibao.net/index.php/portfolio/

1.2.1

  • Bugfix: Error 404 "Page not found" with "auto count"

1.2

  • Bugfix: tables in DB were not be created every time (seen on mysql < 5)
  • New: "auto count" can count visits without changes on template

1.1

  • Languages: english, german
  • HTTP _ USER _ AGENT will be saved, identification of new search bots
  • Stylesheet in file counter.css

1.0

  • first release
created by Readme Parser

RSS-Feed 506 Kommentare

alle Kommentare anzeigen / show all comments
  1. breiter sagt:

    Hallo Tom,

    habe in WP 2.9.2 von 2.8 auf 2.9 updated un erhalte diese Fehlermeldung:

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /html/wordpress/wp-content/plugins/count-per-day/counter.php on line 855

    Standard-Einstellungen sind leer und werden wohl nicht gespeichert, da die bei nochmaligem Aufruf wieder verschwinden, de- und aktivieren hat nichts gebracht, import der Datenbanken aus anderer installation auch nicht.

    Hmm? Kannst du helfen?

    • Tom sagt:

      Wenn die Einstellungen leer sind, können die mysql-Queries nicht richtig erstellt werden, das würde den Fehler erklären.
      Lösche mal per phpmyadmin in der Tabelle wp_options den Eintrag mit option_name = ‘count_per_day’ und speichere dann die Einstellungen nochmal. Vielleicht stimmt da was nicht. Ich hab sonst nichts geändert.

      • breiter sagt:

        du hast recht, da stimmt was nicht: Der Eintrag ist nicht vorhanden. Habe den Eintrag manuell angelegt mit der Option ID=2516 (aus der anderen Installation abgeguckt). Nach erneutem speichern der Standardeinstellungen, verschwinden diese wieder, der Eintrag unter wp_options bleibt, aber mit option ID=0.
        Komisch oder?

  2. breiter sagt:

    Sorry Tom, habe es jetzt doch hingekriegt mit dem Anlegen des wp_options Eintrages, allerdings mit der Version 2.8., die ich bis zum nächsten Versuch erstmal mal laufen lasse. Danke für deine Hilfe.

Kommentare Seite:«12131415161718192021
alle Kommentare anzeigen / show all comments

Kommentar schreiben




Quicktags:

Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Tiny Corner