I have modified everything successfully except the last stage of the anmin/functions there is a major difference in the text that should be there and what is currently there. all i can presume is that either i have a hack that also modifies that area but i cant recognoise it.
this is what should be there
PHP Code:
// ###################### Start dovars #######################
function dovars($newtext,$sendheader=1) {
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg;
static $vars;
if (connection_status()) {
exit;
}
if (!isset($vars)) {
$vars=$DB_site->query("SELECT findword,replaceword FROM replacement WHERE replacementsetid IN(-1,'$replacementsetid') ORDER BY replacementsetid DESC,replacementid DESC");
} else {
$DB_site->data_seek(0,$vars);
}
while ($var=$DB_site->fetch_array($vars)) {
if ($var['findword']!="") {
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
}
}
This is what is currently in my functions.php
PHP Code:
// ###################### Start dovars #######################
function dovars($newtext, $sendheader = 1)
{
// parses replacement vars
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg,$fullpm,$bbuserinfo,$microstats;
static $vars;
if (connection_status())
{
exit;
}
if (!is_array($vars))
{
// build an array of $vars containing find/replace values
$vars = array();
$replacements = $DB_site->query("
SELECT findword, replaceword, replacementsetid
FROM replacement
WHERE replacementsetid IN(-1, '" . intval($replacementsetid) . "')
ORDER BY replacementsetid, replacementid DESC
");
while ($replacement = $DB_site->fetch_array($replacements))
{
if ($replacement['findword'] != '')
{
$vars["$replacement[findword]"] = $replacement['replaceword'];
}
}
unset($replacement);
$DB_site->free_result($replacements);
}
if (PHPVERSION < '4.0.5' or 1)
{
// do each replacement in turn for PHP < 4.0.5
reset($vars);
while(list($find, $replace) = each($vars))
{
$newtext = str_replace($find, $replace, $newtext);
}
}
else
{
// do all replacements in one go (PHP >= 4.0.5 only)
$newtext = str_replace(array_keys($vars), $vars, $newtext);
}
if ($newpmmsg)
{
if (substr($PHP_SELF,-strlen('private.php')) == 'private.php')
{
// do nothing
}
else
{
$newtext = preg_replace("/<body/i", "<body onload=\"Javascript:confirm_newpm()\"", $newtext);
}
}
if ($gzipoutput and !headers_sent())
{
$newtext = gzipoutput($newtext, $gziplevel);
}
if ($sendheader)
{
@header("Content-Length: " . strlen($newtext));
}
return $newtext;
}
// ###################### Start standarderror( #######################
Can anyone help ???