Hi Doze! I installed BBClone at my site
www.amdias.com but i've found that IE users were marked as Netscape... I went to BBClone forum, but no one knew the problem.
So i've found that in index.php of MODx there was this piece of code:
$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? preg_replace("/[^A-Za-z0-9_\-\,\.\/\s]/", "", $_SERVER['HTTP_USER_AGENT']): '';
$_SERVER['HTTP_REFERER'] = isset($_SERVER['HTTP_REFERER']) ? preg_replace($modxtags,"", $_SERVER['HTTP_REFERER']) : '';
Because of this convertions, BBClone, called at the end of the index.php can't work properly.
The only way to BBClone work without problems is doing something like this:
$HTTP_USER_AGENT = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
$HTTP_REFERER = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
Before
$_SERVER['HTTP_USER_AGENT'] = isset($_SERVER['HTTP_USER_AGENT']) ? preg_replace("/[^A-Za-z0-9_\-\,\.\/\s]/", "", $_SERVER['HTTP_USER_AGENT']): '';
$_SERVER['HTTP_REFERER'] = isset($_SERVER['HTTP_REFERER']) ? preg_replace($modxtags,"", $_SERVER['HTTP_REFERER']) : '';
Finaly, at the end of index.php:
$_SERVER['HTTP_USER_AGENT'] = $HTTP_USER_AGENT;
$_SERVER['HTTP_REFERER'] = $HTTP_REFERER;
$page_title=$modx->documentObject['pagetitle'];
$bbclone_path=$modx->config['$base_path']."stats/";
define("_BBC_PAGE_NAME", "$page_title");
define("_BBCLONE_DIR", $bbclone_path);
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
And thats it! I hope this will be usefull to someone!
Sorry my english, regards,
ADias