Quote:
Originally Posted by Boofo
Is there a way to have it parse the whole line in the hightlight color when there is the /me code in it no matter where the /me code is in the line? Does that make any sense?
|
change:
'#^/me(.*)$#im'
to:
'#^(.*)/me(.*)$#im'
change:
$post[username] \\1
to:
\\1 $post[username] \\2
change:
$originalposter \\1
to:
\\1 $originalposter \\2
in all the preg_replace() calls and it should do what you want.
this text that /me typed
would come out as:
* this text that masahiko typed
make sense? of course, i haven't used the hack_me.php version so all my example chages are based of the original/my own.