MyBB Community Forums

Full Version: Where would I add this code ??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I tryed adding to MyBB's index.php

<?php
include_once $_SERVER[ 'DOCUMENT_ROOT' ].'/twatch/api/LogRequest.php';
twatchLogRequest();
?>

Trying to add this code from http://www.tracewatch.com/ its a website stats script.

I did try adding to the top of the index.php but when i did that site would not work.
Try putting it in global.php.
get a HTTP 500 error

Same as what i get when i put it in index.php
O.k.
Gottena little farther with this but still need help
 <?php
include_once $_SERVER[ 'DOCUMENT_ROOT' ].'/myaddons/twatch/api/LogRequest.php';
twatchLogRequest();
?>
I use this now
<!-- <?php
include_once $_SERVER[ 'DOCUMENT_ROOT' ].'/myaddons/twatch/api/LogRequest.php';
twatchLogRequest(true);
?> -->
which works with the tracking script if its put before the opening php tag on global.php or index.php on firefox 5 but in IE 9 it messes up logo and my css 3 menu
Can any one help me?
Try to shift+f5

if that doesn't work, clear the cache, then refresh.
Thank you for your post I tryed it on two differnt computers and I could not get it to work
^ not sure if this helps - put the code in headerinclude template (at bottom)
Hay thanks ranjani
that has seem to have worked
I guess I should have tryed adding it to the templates all so

I guess I thought cause it was php i had to add it to php file

Well thanks again
going to go play with tracewatch settings
It is PHP, unless you have the PHP in Templates plugin, that won't work.
^ here is the external link for that plug-in (if required) : PHP in Templates / Complex Templates
Pages: 1 2