PHP: Integrate BBclone with WordPress

There’s a lot of statistics applications around, some are quite good, but often strains the resources of the server with consumption of memory and CPU being raised together with queries to your MySQL server – not so with BBClone.

The slogan of BBClone is: “A PHP based Web Counter on Steroids”, and yea, it is quite detailed and displays the most pertinent information for statistics gathering, but most of all: it is very lightweight on all manner of resources. It does not even use a database which takes up queries to your MySQL server, it’s all stored on disk.

To integrate BBClone with WordPress is simple. Just edit the index.php file of your theme and add this code:

define('_BBC_PAGE_NAME', $_SERVER['REQUEST_URI']);
define('_BBCLONE_DIR', '/your/complete/location/to/bbclone');
define('COUNTER', _BBCLONE_DIR . 'mark_page.php');
if (is_readable(COUNTER)) include_once(COUNTER);
//echo "<!-- statistics -->";

This code must preferably be added before:

get_header();

Do the same routine for the file handling your pages; which is to say – page.php or in some cases single.php

That’s it. I’ve used BBClone since the day it was first crafted, in most of my pages / applications. German precision and attention to detail makes this a great choice


BBClone:

Download at http://bbclone.de

Leave a Reply

Your email address will not be published. Required fields are marked *