• Hi,

    For the past 2 years I’ve had BBClone as my stats software. It’s worked 100%, but last night I redesigned my site and I can’t get it working how I’d like it, or indeed at all.

    I appreciate it’s a 3rd party problem, but I’m wondering ‘where’ to put the script within the template of my page.

    This time round I’ve decided to do my pages within WordPress (wish I’d done it earlier!!!!) but in the past, I’ve always had the following code to initialise the stats…

    <?php
    define(“_BBC_PAGE_NAME”, “Home”);
    define(“_BBCLONE_DIR”, “sa/stats/”);
    define(“COUNTER”, _BBCLONE_DIR.”mark_page.php”);
    if (is_readable(COUNTER)) include_once(COUNTER);
    ?>

    The “home” is generally changed to the page title so I can see where people are going.

    What I’d like now however is something like the following…

    <?php
    define(“_BBC_PAGE_NAME”, wp_title());
    define(“_BBCLONE_DIR”, “sa/stats/”);
    define(“COUNTER”, _BBCLONE_DIR.”mark_page.php”);
    if (is_readable(COUNTER)) include_once(COUNTER);
    ?>

    But that just shows nothing. I’ve hard-coded the page title, but I’ve only managed to get that working if I insert the code at the very end of the header.php file within my theme.

    So, does anyone know ‘where’ I can put this script to make it run, and how I can get the wp_title variable of wordpress to tag as the visiting page?

    TIA

Viewing 1 replies (of 1 total)
  • Thread Starter jmhirst

    (@jmhirst)

    Made a bit of progress on this, I’m hoping some PHP expert can fill in the missing piece…

    I have my title, which I grab by wp_title().

    But the BBClone needs a string enclosed in quotations.

    If I have…

    define(“_BBC_PAGE_NAME”, “wp_title()”);

    My stats show “wp_title()” as every page visited.

    If I have…

    define(“_BBC_PAGE_NAME”, wp_title());

    Then my stats show nothing as the wp_title() text isn’t enclosed in quotations.

    Is there a way in PHP to pass a variable inside quotations?

    TIA

Viewing 1 replies (of 1 total)
  • The topic ‘BBClone stats stopped working’ is closed to new replies.