MyBB Community Forums

Full Version: Add a bit of code to mybb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am hoping that someone might be able to help me with this.
This is a code that I need to put some where in my site and I know that I can not put it in the templates the way it is or even a core file.
So could some one show me the changes and tell me where to put it template or core?
There is JavaScript That I could use and would be easier but I do not want to use it if I do not have to.
This is where I got this bit of code
http://www.tracewatch.com/doc/code
<?php
	$_SERVER[ 'DOCUMENT_ROOT' ] = str_replace('\\','/',substr(
		str_replace('\\', '\', $_SERVER['PATH_TRANSLATED']),
		0, 0-strlen($_SERVER['PHP_SELF'])));

	include_once $_SERVER[ 'DOCUMENT_ROOT' ].'/twatch/api/LogRequest.php';
	twatchLogRequest();
?>
Some can delete this
I just looked back in my post history and I found this question I asked something like this back in 2009 I knew i ask some where just did not think it was here at MyBB.
so such code can be added to headerinclude template with php in templates plugin activated.
If you want it in the headerinclude template without installing a plugin, edit global.php and add your code before line #526.