testbot,
It works for me with your cforumstats.php:
Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'cforumstats'); // change this depending on your filename
// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
);
// get special data templates from the datastore
$specialtemplates = array(
);
// pre-cache templates used by all actions
$globaltemplates = array(
'cforumstats',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
chdir('/home/***/public_html/community');
require_once('./global.php');
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
//$navbits[$parent] = 'cforumstats';
//$navbits = construct_navbits($navbits);
//eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('cforumstats') . '");');
?>
and "cforumstats" template:
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" style="background-image:none;padding:0px;margin:0px;background-color:none;">
<head>
<title></title>
$headinclude
</head>
<body style="background-image:none;padding:0px;margin:0px;background-color:#000000;">
<div style="width:100%;background-color:none;">
$cybtopstats
</div>
</body>
</html>
I've just removed this line from php:
Code:
chdir('/home/***/public_html/community');
and added "cforumstats" to "Stats on Custom Pages" setting field (product options page).
cforumstats.php was in main forum dir, and I had black page with AFS loaded with no problems.