To add bbclone stats to MODx, follow these simple steps:
1. Download bbclone and follow the installation instructions. You can install it anywhere on your server, you will have to adjust the path in the next step.
2. Add the following code at the very bottom of your main index.php file, right before the ?>
/*-------- BBClone Stats ---------*/
// add the bbclone page counter stuff
$page_title=$modx->documentObject['pagetitle'];
define("_BBC_PAGE_NAME", "$page_title");
define("_BBCLONE_DIR", "../bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
adjust the path to your install in the second define line: define("_BBCLONE_DIR",
"../bbclone/");
you can also add to or change what shows in the stats as far as page title, just change the first define appropriately. I use the stats for a few scripts so I add a special prefix.