Yes BBClone is a nice statcounter, if i get to work in a function it would be really nice. :)
Hamish the function you wrote seems to work because i get an error from my bbclone program.
Is $this->Name in the form of Home or Weblog or is it home.php and weblog.php ?
I get this msg from my bbclonde installation:
BBClone unknown debug mode:
BBClone isn't able to read its configuration data. This is likely because you embedded BBClone's code snippet into a function. Please use BBClone as suggested in the documentation
The BBClone project is dead atm and the documentation is not accesible anymore....
I hope someone can help me out with the function.
I have the following page_controller which should be correct:
class Page_Controller extends ContentController {
function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
define("_BBC_PAGE_NAME", $this->Name);
define("_BBCLONE_DIR", "../st/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
}
}