• Hy there again… one more problem. I’m trying to include an external php file to all wp pages. It’s an statistic script – TraceWatch – i say it’s the best free one.

    My problem sounds like this: i’m inserting the include command:

    <?php @include_once $GLOBALS[‘HTTP_SERVER_VARS’][‘DOCUMENT_ROOT’].’/twatch_include/logger.php’; ?>

    … in all my template files, but nothing is changing in the statistics. If i’m using an external page from wp script – works fine.

    Is there an another way i can include this code to all my WP pages… ?

    Tnq…

Viewing 4 replies - 16 through 19 (of 19 total)
  • Hi Dave,

    I’ve posted the code from my 2 files, here is the index.php and here is wp-blog-header.php

    I just can’t understand this having to be in 2 seperate files to work, it doesn’t make sense! AHH!

    I’m going to work on this this weekend, I’m sure I can figure out something better than this!!

    Cheers,
    Michael.

    Michael,

    Thank you for posting the files. At least I know I was trying the right thing. Unfortunetly it didn’t work for me. The pages don’t fully load. Upon multiple refreshs, sometimes they load, most times they didn’t. I’m using this inlude code below, as it’s the only one that worked to track subdomains. Hopefully you have better luck then me trying to figure it out. Thanks again. Dave

    <?php
    $GLOBALS[‘adl_alt_docroot’]=’/home/’my site’/public_html/stats’;
    $GLOBALS[‘adl_alt_instance’]=’DF’;
    $GLOBALS[‘adl_count_params’]=true;
    @include_once $GLOBALS[‘adl_alt_docroot’].’/twatch_include/logger.php’;
    ?>

    I have the same problems with twatch. And the problem was from our PHP server. How? Just try to use phpinfo.php on main folder, where index it is. If on the results you can find the
    “DOCUMENT_ROOT” then be sure your application “twatch” will be work. Otherwise just try to discuss with your hosting provider about this problem.

    Results for this variable can be like “C:\\Inetpub\\vhosts\\domain.com\\httpdocs”.

    I’m trying to get twatch to work with wp too but no chance..
    I tried putting it in to root index.php and wp-blog-header but still, it just counts a random hit or two in a while.

    It confuses me.

Viewing 4 replies - 16 through 19 (of 19 total)

The topic ‘Twatch include in WP’ is closed to new replies.