Quote:
Originally Posted by jesus likes pie
ah yes erwin you messed up i guess in the edit cause i found the code from yesterday. Anyways this is the right code:
PHP Code:
// /me hack
if (THIS_SCRIPT == 'newreply' && !isset($bbcode) && isset($pagetext))
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$postinfo['username'].' $3', $pagetext);
elseif (THIS_SCRIPT == 'private' && !isset($bbcode) && isset($pagetext))
$pagetext = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '$1* '.$pm['fromusername'].' $3', $pagetext);
elseif (isset($bbcode) && $dobbcode && is_array($GLOBALS['post']))
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '[color=red]$1* '.$GLOBALS['post']['username'].' $3[/color]', $bbcode);
elseif (isset($bbcode) && $dobbcode && $GLOBALS['previewpost'])
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '[color=red]$1* '.$GLOBALS['bbuserinfo']['username'].' $3[/color]', $bbcode);
elseif (isset($bbcode) && $dobbcode && isset($GLOBALS['fromuserinfo']))
$bbcode = preg_replace('#^(([ \t]|\[[a-z]+[^\]]*\])*)/me[ \t](.*)$#Uim', '[color=red]$1* '.$GLOBALS['fromuserinfo']['username'].' $3[/color]', $bbcode);
// /me hack
|
Great it works in 3.0.8 just some notes:
in newreply.php search for:
PHP Code:
$pagetext = htmlspecialchars_uni($postinfo['pagetext']);
$pagetext = trim(strip_quotes($pagetext));
and in private.php:
PHP Code:
$pagetext = trim(htmlspecialchars_uni($pagetext));