If you have the hack installed replace the following with the code I posted above:
PHP Code:
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
If you are doing a fresh install replace the following
PHP Code:
function process_replacement_vars($newtext, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!empty($style['replacements']))
{
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
// this is WAY too slow!
//$newtext = strtr($newtext, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$newtext = str_replace(array_keys($replacementvars), $replacementvars, $newtext);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$newtext = preg_replace(array_keys($replacementvars), $replacementvars, $newtext);
}
return $newtext;
}
with
PHP Code:
function process_replacement_vars($newtext, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
if (THIS_SCRIPT != editpost) {
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
}
$replacementvars['/\[test\]/i'] = "This is just a test.";
// this is WAY too slow!
//$newtext = strtr($newtext, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$newtext = str_replace(array_keys($replacementvars), $replacementvars, $newtext);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$newtext = preg_replace(array_keys($replacementvars), $replacementvars, $newtext);
return $newtext;
}